Browse Source

stop clearing editor_plugin_screen on script edit

SchultzenDK 2 weeks ago
parent
commit
f5aacc9bd6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/editor_node.cpp

+ 3 - 0
editor/editor_node.cpp

@@ -2926,6 +2926,9 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
 				if (!changing_scene) {
 				if (!changing_scene) {
 					main_plugin->edit(current_obj);
 					main_plugin->edit(current_obj);
 				}
 				}
+			} else if (Object::cast_to<Script>(current_obj)) {
+				editor_main_screen->select(plugin_index);
+				main_plugin->edit(current_obj);
 			} else if (main_plugin != editor_plugin_screen) {
 			} else if (main_plugin != editor_plugin_screen) {
 				// Unedit previous plugin.
 				// Unedit previous plugin.
 				editor_plugin_screen->edit(nullptr);
 				editor_plugin_screen->edit(nullptr);