You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a problem within the editor ui. When you open a scene each creates its own tab and when there are too many to fit the screen width a couple of icons appear to move/scroll the tabs themselves. At that point something weird happens because if you have the last one selected (as it happens if you just opened it) and you click its tab close button that scene does not get closed but the editor closes one of the previous ones instead.
As side note: if instead of using the tab close button, you right click the tab and use the "close tab" menu option then the right tab gets closed. So the problem seems to be related specifically to the tab's close button itlsef.
Steps to reproduce
You only need a project with enough scenes, in the following screenshots you can see I just created a new blank project and added some empty Node2D scenes (each named scene_xx to make the issue easy to follow):
Then you just need to open many of the scenes until they do not fit the ui allocated space for tabs, in this case I opened 15 scenes:
As the final scene opened is the "scene_15" I click its close tab button but it does not get closed, if you check the opened tabs you can see that the "scene_09" tab was closed instead:
Clicking again the "scene_15" (still opened!) tab's close button now closes the "scene_10":
Clicking again the "scene_15" tab's close button now closes the "scene_11":
And clicking again the "scene_15" tab's close button now closes the "scene_12":
And clicking again the "scene_15" tab's close button now closes the "scene_13":
Clicking again the "scene_15" tab's close button now closes the "scene_14":
At this point you can see that all the open scenes fit the allocated ui tab space (the tab scroll buttons are no longer present) so if I click the "scene_15" tab's close button it finally gets closed:
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
The showcased scene tab bar issue is indeed a regression as it's not reproducible in v4.2.2.stable.official [15073af], however the root cause of the bug is actually present in there as well.
For reproducing the issue in in v4.2.2.stable.official [15073af] create a scene with a single TabBar and such script attached:
The actual issue is that the tab's remove button's rect is not being cleared after the button is hidden, and mouse position is being checked against such incorrect/outdated rect, possibly deducing that incorrect tab's close button was clicked.
The underlaying issue within the TabBar was probably revealed for the scene tab bar in #83957 (guessing, haven't actually bisected) by this change:
update_scene_tabs now resizes its tabs only if it needs to, instead of always clearing and adding one by one.
Tested versions
System information
Godot v4.3.rc2 - TUXEDO OS 3 22.04.4 - Wayland - GLES3 (Compatibility) - Mesa Intel(R) Graphics (RPL-S) - 13th Gen Intel(R) Core(TM) i9-13900HX (32 Threads)
Issue description
This is a problem within the editor ui. When you open a scene each creates its own tab and when there are too many to fit the screen width a couple of icons appear to move/scroll the tabs themselves. At that point something weird happens because if you have the last one selected (as it happens if you just opened it) and you click its tab close button that scene does not get closed but the editor closes one of the previous ones instead.
As side note: if instead of using the tab close button, you right click the tab and use the "close tab" menu option then the right tab gets closed. So the problem seems to be related specifically to the tab's close button itlsef.
Steps to reproduce
You only need a project with enough scenes, in the following screenshots you can see I just created a new blank project and added some empty Node2D scenes (each named scene_xx to make the issue easy to follow):
Then you just need to open many of the scenes until they do not fit the ui allocated space for tabs, in this case I opened 15 scenes:
As the final scene opened is the "scene_15" I click its close tab button but it does not get closed, if you check the opened tabs you can see that the "scene_09" tab was closed instead:
Clicking again the "scene_15" (still opened!) tab's close button now closes the "scene_10":
Clicking again the "scene_15" tab's close button now closes the "scene_11":
And clicking again the "scene_15" tab's close button now closes the "scene_12":
And clicking again the "scene_15" tab's close button now closes the "scene_13":
Clicking again the "scene_15" tab's close button now closes the "scene_14":
At this point you can see that all the open scenes fit the allocated ui tab space (the tab scroll buttons are no longer present) so if I click the "scene_15" tab's close button it finally gets closed:
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: