Fix Theme editor's default preview not having the correct theme#118352
Open
YeldhamDev wants to merge 1 commit intogodotengine:masterfrom
Open
Fix Theme editor's default preview not having the correct theme#118352YeldhamDev wants to merge 1 commit intogodotengine:masterfrom
Theme editor's default preview not having the correct theme#118352YeldhamDev wants to merge 1 commit intogodotengine:masterfrom
Conversation
c71ffda to
022bbc1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not sure if this the Correct™ fix, but it solves the problem. For the theme context creation to work, it appears that the node must be visible when it happens. Whatever happened in #108647 made so that theThemeeditor didn't count as "visible" anymore, and broke the mechanism.The actual source of the problem may be deeper than this. If so, I'm all ears for suggestions.Found the actual problem: theme contexts get destroyed on node removal, and after #108647,
EditorDockManager::_move_dock()gets called after the default theme preview gets ready, and since the ready state only happens once, it never gets re-created again.This PR changes the notification to
NOTIFICATION_POST_ENTER_TREE, which can be triggered indefinitely.Fixes #116118.