瀏覽代碼

3DEditor: fix selecting node in viewport not update inspector

Poommetee Ketson 7 年之前
父節點
當前提交
cfac160f9f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/plugins/spatial_editor_plugin.cpp

+ 3 - 0
editor/plugins/spatial_editor_plugin.cpp

@@ -318,6 +318,9 @@ void SpatialEditorViewport::_select(Spatial *p_node, bool p_append, bool p_singl
 		editor_selection->clear();
 		editor_selection->add_node(p_node);
 
+		if (Engine::get_singleton()->is_editor_hint())
+			editor->call("edit_node", p_node);
+
 	} else {
 
 		if (editor_selection->is_selected(p_node) && p_single) {