summaryrefslogtreecommitdiff
path: root/editor/create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r--editor/create_dialog.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 3c2bfdc04d..364c5126d7 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -113,18 +113,6 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode) {
_update_search();
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- search_options->add_constant_override("draw_relationship_lines", 1);
- search_options->add_color_override("relationship_line_color", rl_color);
- search_options->add_constant_override("draw_guides", 0);
- } else {
- search_options->add_constant_override("draw_relationship_lines", 0);
- search_options->add_constant_override("draw_guides", 1);
- }
-
is_replace_mode = p_replace_mode;
if (p_replace_mode) {
@@ -216,7 +204,7 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p
if (cpp_type) {
String cpp_to_select_type = to_select_type;
if (ScriptServer::is_global_class(to_select_type))
- cpp_to_select_type = ScriptServer::get_global_class_base(to_select_type);
+ cpp_to_select_type = ScriptServer::get_global_class_native_base(to_select_type);
current_item_is_preferred = ClassDB::is_parent_class(p_type, preferred_search_result_type) && !ClassDB::is_parent_class(cpp_to_select_type, preferred_search_result_type);
} else {
current_item_is_preferred = ed.script_class_is_parent(p_type, preferred_search_result_type) && !ed.script_class_is_parent(to_select_type, preferred_search_result_type) && search_box->get_text() != to_select_type;
@@ -299,15 +287,15 @@ void CreateDialog::_update_search() {
} else {
bool found = false;
- String type = I->get();
- while (type != "" && (cpp_type ? ClassDB::is_parent_class(type, base_type) : ed.script_class_is_parent(type, base_type)) && type != base_type) {
- if (search_box->get_text().is_subsequence_ofi(type)) {
+ String type2 = I->get();
+ while (type2 != "" && (cpp_type ? ClassDB::is_parent_class(type2, base_type) : ed.script_class_is_parent(type2, base_type)) && type2 != base_type) {
+ if (search_box->get_text().is_subsequence_ofi(type2)) {
found = true;
break;
}
- type = cpp_type ? ClassDB::get_parent_class(type) : ed.script_class_get_base(type);
+ type2 = cpp_type ? ClassDB::get_parent_class(type2) : ed.script_class_get_base(type2);
}
if (found)