Godot Engine – Multi-platform 2D and 3D game engine
Fix instantiating scenes with no selection
kobewi684b5369065d
diff --git a/editor/docks/scene_tree_dock.cpp b/editor/docks/scene_tree_dock.cppindex 03d863e5c38..3f6d64fe09e 100644--- a/editor/docks/scene_tree_dock.cpp+++ b/editor/docks/scene_tree_dock.cpp@@ -85,8 +85,12 @@ void SceneTreeDock::_nodes_drag_begin() {void SceneTreeDock::_quick_open(const String &p_file_path) {List<Node *> selection = editor_selection->get_top_selected_node_list();- for (Node *node : selection) {- instantiate_scenes({ p_file_path }, node);+ if (selection.is_empty()) {+ instantiate_scenes({ p_file_path }, nullptr);+ } else {+ for (Node *node : selection) {+ instantiate_scenes({ p_file_path }, node);+ }}}