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

Expanded polygon editor closes when selecting another tile #97828

Open
KoBeWi opened this issue Oct 4, 2024 · 0 comments
Open

Expanded polygon editor closes when selecting another tile #97828

KoBeWi opened this issue Oct 4, 2024 · 0 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Oct 4, 2024

Tested versions

4.4 db66bd3

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

Introduced in #95034

bB76LVVu3O.mp4

Technically it's not a regression, because it fixed a worse issue, but it can still be improved.

More info from the PR:

TileSet editor has an internal inspector that really likes getting refreshed. One instance is when you select another tile, another is when a polygon is added or removed:

notify_property_list_changed();

This causes all property editors to get destroyed and re-created.
There is one special editor though - the expanded editor. When you expand polygon editor (see #79512), it's moved to a different parent that isn't inside the inspector. So when inspector is cleared, the expanded editor survives it and holds outdated information.

I don't have a good solution for that yet. Perfectly, when inspector is refreshed, the previous editor should be automatically expanded again. However the "previous" editor no longer exists and there can be multiple polygon editors, so it has to be somehow remembered per-property, idk.

Steps to reproduce

  1. Edit TileSet
  2. Edit some tile's polygon
  3. Expand the editor
  4. Select another tile

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant