-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TabContainer resets visibility to first tab in editor #50930
Comments
Can you demonstrate what you do with a video? Those steps are not enough to reproduce the issue. Changes to the visibility and selection in the scene dock are preserved when you switch between the scenes. |
Sure. I didn't because I presumed it was simple and in case it was already a case. Give me a few minutes. |
@pycbouh bug-tabcontainer2.mp4 |
The supposed way of switching tabs is changing the The editor is trying to re-sync the scene with |
You can select a node and use Ctrl + Up/Ctrl + Down to move it in the Scene tree dock. Using the keyboard is more precise than using drag-and-drop for this kind of stuff. |
You can make the node last child by dropping it on the parent node. This bothered me for a long time too :) |
So is this a bug, I'm not sure by the comments, seems like it to me? btw, sorry for the extra addition, Sometimes sneaking in a question here is the best way to get answers as the UI is sometimes complex to use. In other IDEs when you drag you can move your move your mouse left/right at the relevant points and it indents the control for you. Would be nice. |
Do you have a tool script that interacts with the tabs, per chance? Can you reproduce this behavior with a simple scene you create from scratch? Also, can you try 3.3.2? I tried to do the same things and it didn't change the visibility or selection no matter what. |
I wanted to point it out too, but this is not about the tab you see when you run the scene, it's about the editor visibility state. Which for whatever reason gets reset for chucklepie when they switch the scenes, which shouldn't happen. |
@pycbouh In a |
@timothyqiu Except... 🙃 2021-07-27_16-16-55.mp4 |
@pycbouh I could easily reproduce the issue until I followed your steps in the video, and now I can never reproduce it again 😂 ... and I have no idea why :( |
@pycbouh , @timothyqiu , and anyone else... Find attached solution with no code and as simple as it gets. If it doesn't do it for you, then I guess there's a Linux Mint Mate bug ;-)
You can swap 2 and 3 if you want, it doesn't matter, it's simply the act of switching scenes. |
Hi, This problem still in place with Godot 4.1.1 version. I'm on Windows 10 and the same can be see with standard and mono version of godot. TabsRefreshed.mp4 |
In Godot v4.2.beta2
|
Checking the .tscn file,
|
It is indeed an editor only property, not stored |
Do we know why? |
I don't think it is desired to set which is the selected tab in that way, why should it be stored otherwise? No other thing like that is stored, like which item is selected in a list |
For Otherwise if you want a Also, I tested removing the editor only flag and it causes index out of range errors because it needs the tabs to be added first. I think this is more likely the reason it was editor only. Maybe this could be fixed in However, if it is desired to act this way, the docs on |
The problem with resetting current tab is that the tab container changes visibility of its children. If you save scene with tab > 0, a different control from the first one will be visible. This means that when you reopen the scene and save, it will cause scene changes without any user action. However not saving the current tab is convenient, because you can freely edit content of any tab. If the current tab is saved, you need to remember to reset it or do it using script (which causes double tab switch). It's easier to store tab index than to fix the problem with incorrect visible control. Even if the current behavior is convenient, it's unexpected and has a bug. |
Godot version
3.3 stable
System information
linux mint
Issue description
You're working on a single tab and need to switch to another scene or code. When you go back, whatever tab(s) you had selected is/are removed and the first one is selected.
This is really very annoying and forces you to constantly update visibility in the editor or temporarily move your tab (if you are editing just one) to the very top.
btw, It wouldn't be 'as bad' if you could drag items down (but still a pain) but Godot stops you from moving items to the bottom of the list because when at the bottom it eithier changes level to one before or one after, it will not let you move a sibling to be the last one.
Steps to reproduce
Minimal reproduction project
game.zip
The text was updated successfully, but these errors were encountered: