tiled icon indicating copy to clipboard operation
tiled copied to clipboard

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

Open Arlorean opened this issue 1 year ago • 5 comments

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 avatar Aug 17 '22 13:08 Arlorean

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

eishiya avatar Aug 17 '22 15:08 eishiya

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

Arlorean avatar Aug 17 '22 17:08 Arlorean

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.

bjorn avatar Aug 17 '22 18:08 bjorn

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)

Arlorean avatar Aug 17 '22 18:08 Arlorean

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.

eishiya avatar Aug 17 '22 19:08 eishiya