From b4e7299b72fbf4afded9a8831ad5b9d42b82e8b5 Mon Sep 17 00:00:00 2001 From: Will Nations Date: Thu, 25 Oct 2018 13:33:16 -0500 Subject: [PATCH] Restore ClearScript btn w/ ExtendScript RMB link --- editor/scene_tree_dock.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index f908641bab2..ebc005ff265 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -358,15 +358,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { ScriptLanguage *l = ScriptServer::get_language(i); if (l->get_type() == existing->get_class()) { String name = l->get_global_class_name(existing->get_path()); - if (ScriptServer::is_global_class(name)) { - if (EDITOR_GET("interface/editors/derive_script_globals_by_name").operator bool()) { - inherits = editor->get_editor_data().script_class_get_base(name); - } else if (l->can_inherit_from_file()) { - inherits = "\"" + existing->get_path() + "\""; - } - } else { + if (ScriptServer::is_global_class(name) && EDITOR_GET("interface/editors/derive_script_globals_by_name").operator bool()) { + inherits = name; + } else if (l->can_inherit_from_file()) { inherits = "\"" + existing->get_path() + "\""; } + break; } } } @@ -1503,6 +1500,7 @@ void SceneTreeDock::_script_created(Ref