Skip to content

Fix Theme editor's default preview not having the correct theme#118352

Open
YeldhamDev wants to merge 1 commit intogodotengine:masterfrom
YeldhamDev:default_theme_preview_fix
Open

Fix Theme editor's default preview not having the correct theme#118352
YeldhamDev wants to merge 1 commit intogodotengine:masterfrom
YeldhamDev:default_theme_preview_fix

Conversation

@YeldhamDev
Copy link
Copy Markdown
Member

@YeldhamDev YeldhamDev commented Apr 9, 2026

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 the Theme editor 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.

@YeldhamDev YeldhamDev added this to the 4.7 milestone Apr 9, 2026
@YeldhamDev YeldhamDev requested review from a team as code owners April 9, 2026 15:43
@YeldhamDev YeldhamDev force-pushed the default_theme_preview_fix branch from c71ffda to 022bbc1 Compare April 9, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Default Preview" falls back to editor theme data instead of the actual defaults

1 participant