Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show "Move Object To Layer" context menu as a tree when Object Layers are inside Group Layers #3454

Closed
Arlorean opened this issue Aug 17, 2022 · 5 comments · Fixed by #3811
Closed
Labels
feature It's a feature, not a bug.

Comments

@Arlorean
Copy link

Problem

We have a map where we have a Group Layer for each "Floor" of a building. Inside each group there is a set of object and tile layers, like "Walls", "Floor", "Enemies". When we right click on a selected object to Move Object To Layer, the layers are shown in a flattened hierarchy so there are multiple "Walls", etc. layers and it's not clear which one is for which floor.

Suggested Solution

It would be better if the Move Object To Layer pull right menu displayed a tree where further sub-menus are Group Layer names and leaf nodes are the Object Layer names under those group layers.

Current Workaround

As a workaround we're currently adding a floor number to each layer name, e.g. "Walls4" for the walls on floor 4. It works but it would be nicer to be able to select the "Walls" layer under the "Floor4" group layer.

This image shows the problem of the flattened menu and the workaround we're using to add numbers to layer names:
image

Here are our test files if it helps to see the issue and see any potential fix:
Example.zip

@Arlorean Arlorean added the feature It's a feature, not a bug. label Aug 17, 2022
@eishiya
Copy link
Contributor

eishiya commented Aug 17, 2022

Submenus would be rather annoying if your layer names are unique and the groupings aren't a hindrance or if you have a lot of groups but only 1-2 Object Layers in each, so I'd like for this to either be optional, or display the tree as single menu where the group names are non-selectable headings and the sublayers are indented, e.g.

Camera bounds
Some other ungrouped Object Layer
-- First Floor --
   Enemies
   Lights
   -- Dining Room --
      Supports
-- Second Floor --
   Enemies
   Lights
   Supports
Another ungrouped Object Layer

@Arlorean
Copy link
Author

That is an excellent point. How about keeping it flat but adding the Group layers as text after the layer name like this or using brackets instead of a color:
image

@bjorn
Copy link
Member

bjorn commented Aug 17, 2022

That is an excellent point. How about keeping it flat but adding the Group layers as text after the layer name like this or using brackets instead of a color:

Unfortunately showing two labels in the menu isn't going to be very straight-forward to implement, especially in a cross-platform way. Would it suffice if instead, we'd display the layer list with menu entries as follows?

First Floor/Supports
First Floor/Bulkheads
Second Floor/Supports
etc.

@Arlorean
Copy link
Author

That would work for us. The group path could also be after the name in brackets if that’s better for users like @eishiya:

Supports (First Floor)
Supports (Second Floor)

@eishiya
Copy link
Contributor

eishiya commented Aug 17, 2022

I think labels and indenting would the best and shouldn't require any alignment shenanigans (spaces can be used), but if that's not an option, then I think "Supports (First Floor/Dining Room)" and "Supports (Second Floor)" would work nicely - the information is there for those who need it (and the sorting by layer order will put layers from the same group together), and putting it after the layer name puts it out of the way for those who don't need it.

bjorn added a commit to bjorn/tiled-dev that referenced this issue Aug 23, 2023
Also reversed the order of the layers, to match the order in the Layers
view.

Closes mapeditor#3454
bjorn added a commit to bjorn/tiled-dev that referenced this issue Mar 26, 2024
Also reversed the order of the layers, to match the order in the Layers
view.

Closes mapeditor#3454
bjorn added a commit to bjorn/tiled-dev that referenced this issue Mar 27, 2024
Also reversed the order of the layers, to match the order in the Layers
view.

Closes mapeditor#3454
bjorn added a commit that referenced this issue Mar 27, 2024
Also reversed the order of the layers, to match the order in the Layers
and Objects views.

Move-to-layer menu implementation is now shared between object tools and
objects dock.

Added object group icon to the menu items.

Closes #3454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants