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

Close expanded tile editor when inspector updates #95034

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Aug 1, 2024

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.

For now I just force-close the editor when it's going to become invalid.

godot.windows.editor.dev.x86_64_wcdUtQLTWn.mp4

It's a safe fix that could be applied for now.

Closes #84321
Closes #86720
Opens #95XXX (the new behavior is disrupting, so an issue should be opened if this is merged)

@KoBeWi KoBeWi added this to the 4.4 milestone Aug 1, 2024
@KoBeWi KoBeWi requested a review from groud August 1, 2024 18:41
@KoBeWi KoBeWi force-pushed the take_a_problem_and_make_it_worse._solved branch from 9ff2745 to e2c0346 Compare August 2, 2024 11:43
@akien-mga
Copy link
Member

Opens #95XXX (the new behavior is disrupting, so an issue should be opened if this is merged)

Reminder to open that issue - or should we hold off merging this until investigated further?

@akien-mga akien-mga merged commit fe31ede into godotengine:master Oct 4, 2024
18 checks passed
@KoBeWi KoBeWi deleted the take_a_problem_and_make_it_worse._solved branch October 4, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants