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

Swapping between maps jiggles the selected layer and groups #3282

Open
Macksaur opened this issue Feb 21, 2022 · 7 comments
Open

Swapping between maps jiggles the selected layer and groups #3282

Macksaur opened this issue Feb 21, 2022 · 7 comments
Assignees
Labels
missing feature It's not just a feature, it's a feature that really should be there!
Projects

Comments

@Macksaur
Copy link

Problem

When I am moving around multiple maps and copy/pasting pieces as source material and I swap back to the target map I find all the groups closed and the layer I was on forgotten and instead replaced with a "best guess" at a layer with the same name.

Map A:
- Group1
    - Objects
    - ActualTarget <-- this layer is selected
- Group0
    - Objects

Map B:
- Group1
    - Objects <-- this layer will be selected in order to copy objects

Swapping between Map A -> Map B and swapping back to Map A after selecting some objects from Map B it places me in Group0/Objects when I return to Map A instead of Group1/Objects, not that it matters because I had selected the layer Group1/ActualTarget before I left Map A, intending to paste there.

Goal

I want to be able to edit multiple maps simultaneously with complex group structures and copy/paste between them onto different layers without having to constantly find the layer I was previously on.

  1. Remember the open/closed status of group layers when switching maps
  2. Remember the selected layer when swapping between maps
  3. If none of the above, make a better guess at the layer including group structure?
@bjorn
Copy link
Member

bjorn commented Feb 21, 2022

  1. Remember the open/closed status of group layers when switching maps

This feature is currently missing.

2. Remember the selected layer when swapping between maps

That's what Tiled does by default. The exception is when using a world to jump from one map to another, in which case it tries to be smart by keeping the same layer(s) selected, which it does by looking for layers with the same name.

3. If none of the above, make a better guess at the layer including group structure?

I guess indeed the way forward would be to make the search for matching layers take into account group layers.

@UliAbo
Copy link

UliAbo commented Mar 27, 2022

I don't how complex this is all to implement, but point 1 "Remember the open/closed status of group layers when switching maps" would be very helpful for us as we have a lot of groups and using at least 2 TMX files in parallel. And this drives us crazy opening the groups again after switching...

Would it be possible to implement at least point 1 "soon-ish", as I could imagine the other two are more complex?

@bjorn
Copy link
Member

bjorn commented Mar 28, 2022

@UliAbo Sure, I'll have a look at it.

@bjorn bjorn self-assigned this Mar 28, 2022
@bjorn bjorn added the missing feature It's not just a feature, it's a feature that really should be there! label Mar 28, 2022
@bjorn bjorn added this to Bugs in Roadmap Mar 28, 2022
bjorn added a commit that referenced this issue Apr 4, 2022
Both when switching maps within a session, as well as between restarts,
the expanded group layers are now persistent.

This change also affects expanded group layers and object layers in the
Objects view.

Part of issue #3282
@bjorn
Copy link
Member

bjorn commented Apr 4, 2022

@UliAbo Done for Tiled 1.8.5 or 1.9, whichever comes first. You can get a build from here in a moment. :-)

@UliAbo
Copy link

UliAbo commented Apr 4, 2022

That's cool @bjorn
I will give it a try today!

@UliAbo
Copy link

UliAbo commented Aug 9, 2022

Isn't this implemented / done? Or am I wrong again? :D
I just tested it and it feels like all is in.

@bjorn
Copy link
Member

bjorn commented Aug 11, 2022

Isn't this implemented / done? Or am I wrong again? :D
I just tested it and it feels like all is in.

Well, only "point 1" was implemented, but not "make the search for matching layers take into account group layers". So, when switching between maps in a world (so, not using the document tabs), currently the code synchronizing selected layers can still interfere in case you have multiple layers with the same name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing feature It's not just a feature, it's a feature that really should be there!
Projects
Status: No status
Roadmap
  
Bugs
Development

No branches or pull requests

3 participants