Skip to content

Fix initial dock tabs#113232

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
KoBeWi:dockining
Nov 27, 2025
Merged

Fix initial dock tabs#113232
akien-mga merged 1 commit intogodotengine:masterfrom
KoBeWi:dockining

Conversation

@KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Nov 27, 2025

Fixes #113155

But this is weird. The editor did not load the default layout previously, I don't know what was causing the first tabs to be active.

@KoBeWi KoBeWi added this to the 4.6 milestone Nov 27, 2025
@KoBeWi KoBeWi requested a review from a team November 27, 2025 13:28
@Mickeon
Copy link
Member

Mickeon commented Nov 27, 2025

We could merge this as an urgent fix, but it would be much better to know what's going on because the sheer bewilderment on why this is even happening is not... great

@kitbdev
Copy link
Contributor

kitbdev commented Nov 27, 2025

Moving the p_dock->show() in open_dock to after it is already in the TabContainer caused TabContainer::_on_tab_visibility_changed to be called which automatically sets the changing tab to be the one being shown. This didn't happen before since it was visible before adding to the TabContainer, so the current tab was left at 0.
So open_dock's p_set_current is currently not being respected.

I think p_dock->show() can just be removed, since the TabContainer handles the visibility.

@KoBeWi
Copy link
Member Author

KoBeWi commented Nov 27, 2025

Ok I made a better fix. The notification order still seems consistent.
CC @lodetrick

Copy link
Contributor

@kitbdev kitbdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work @kitbdev

Copy link
Contributor

@lodetrick lodetrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! It shouldn't mess with any of the notification issues because the closed dock parent is now hidden.

@akien-mga akien-mga merged commit 71b6000 into godotengine:master Nov 27, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the dockining branch November 27, 2025 20:56
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.

Initial dock layout selects the wrong docks

5 participants