-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Make the loading scene open in the current scene tab if the current scene is empty #90566
Make the loading scene open in the current scene tab if the current scene is empty #90566
Conversation
What if the "empty" scene is actually not empty but just unsaved? I.e. if you start adding some nodes to it, don't save, and then open a new scene? I wouldn't expect it to discard the unsaved work. |
In this case, the scene root is not null, the scene is unsaved not empty, so a new tab will be opened. |
When you delete scene root and load another scene, it will replace the "empty" one and will be marked as modified. Interestingly, you can undo that to restore the old root and it doesn't break anything 🤔 |
200f050
to
d9b31d4
Compare
0.mp4It should be fine now, but dragging the scene file into the 2D Screen causes the shortcut Ctrl + Z to temporarily not work. |
I can't reproduce the issue in your video. Seems like the node was added to wrong scene tab? |
Another bug:
The undo history is carried to the new scene. You should clear it. |
25fbd1b
to
87fd121
Compare
87fd121
to
291450a
Compare
291450a
to
b5157e0
Compare
Thanks! |
Previously, even if the scene in the current scene tab was empty (no scene root added and no scene path assigned), a new scene might be opened in a new tab when opening the scene through
EditorNode::load_scene()
.This is even worse when dragging the scene file to the 2D screen.