Browse Source

Fixed inspector not going back to single-node when deselecting an item.

Fixed inspector not going back to single-node when deselecting an item.
DualMatrix 7 years ago
parent
commit
ec463b036a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      editor/scene_tree_dock.cpp

+ 4 - 0
editor/scene_tree_dock.cpp

@@ -1587,6 +1587,10 @@ void SceneTreeDock::_selection_changed() {
 	if (selection_size > 1) {
 		//automatically turn on multi-edit
 		_tool_selected(TOOL_MULTI_EDIT);
+	} else if (selection_size == 1) {
+		editor->push_item(EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list()[0]);
+	} else {
+		editor->push_item(NULL);
 	}
 	_update_script_button();
 }