Fix TabContainer set current tab not immediately updating visibility#117232
Open
kitbdev wants to merge 1 commit intogodotengine:masterfrom
Open
Fix TabContainer set current tab not immediately updating visibility#117232kitbdev wants to merge 1 commit intogodotengine:masterfrom
kitbdev wants to merge 1 commit intogodotengine:masterfrom
Conversation
dujanhung
approved these changes
Mar 9, 2026
Member
|
@dujanhung Please mention in your approvals what kind of review you've done. Did you review the code, test the changes, or are you simply communicating that you are interested in this change? If the latter, please use reactions on the OP instead, GitHub approvals should be left to code/design review and/or testing. See https://contributing.godotengine.org/en/latest/pull_requests/review_guidelines.html if you're interested in reviewing PRs. |
KoBeWi
approved these changes
Mar 9, 2026
YeldhamDev
approved these changes
Mar 9, 2026
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.
Fix TabContainer set current tab not immediately updating visibility
TabContainer.current_tabdoesn't immediately change visibility #99065_on_tab_changedrepaint was made deferred back in #58687, probably because repaint usestheme_cachewhich will crash if used too early. But nowTabContainer::set_current_tabdoesn't immediately set the current tab, it waits forNOTIFICATION_ENTER_TREE, since #83893.This means it should be safe to repaint immediately when the tab changes.
I tested and didn't find any issues with it.
This also fixes the AnimationTree dock issue, because the TabContainer not being visible immediately caused this check to not work:
godot/editor/animation/animation_player_editor_plugin.cpp
Lines 2490 to 2491 in 220b0b2
Previously it was only possible to have the AnimationTree dock open automatically if the AnimationPlayer dock was already open. This was because this check in the dock manger never changed the tab to the AnimationPlayer dock because it detected that it was already visible since it didn't update yet to show the tree:
godot/editor/docks/editor_dock_manager.cpp
Line 663 in 220b0b2
Before that was a lot of dock manager changes, I haven't checked what made it work in 4.5.
EditorData::get_handling_sub_editorsshould probably be not in reverse order too, that way user plugins (and more specific plugins like AnimationTree) take priority over editor plugins, since they are opened in order and the last opened will override the others.This was sort of even the goal with the PR that changed it #37022