preserve inspector focus when opening script

This commit is contained in:
Hayden Leete 2023-11-01 18:19:27 +13:00
parent 6afd320984
commit 887fd08260

View file

@ -1535,7 +1535,9 @@ void SceneTreeDock::_load_request(const String &p_path) {
}
void SceneTreeDock::_script_open_request(const Ref<Script> &p_script) {
EditorNode::get_singleton()->edit_resource(p_script);
if (ScriptEditor::get_singleton()->edit(p_script, true)) {
EditorNode::get_singleton()->editor_select(EditorNode::EDITOR_SCRIPT);
}
}
void SceneTreeDock::_push_item(Object *p_object) {