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.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index eb11aea9cc..9f1082ecc4 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -89,8 +89,9 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode) {
_save_and_update_favorite_list();
// Restore valid window bounds or pop up at default size.
- if (EditorSettings::get_singleton()->has_setting("interface/dialogs/create_new_node_bounds")) {
- popup(EditorSettings::get_singleton()->get("interface/dialogs/create_new_node_bounds"));
+ Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "create_new_node", Rect2());
+ if (saved_size != Rect2()) {
+ popup(saved_size);
} else {
Size2 popup_size = Size2(900, 700) * editor_get_scale();
@@ -118,8 +119,10 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode) {
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;
@@ -413,7 +416,7 @@ void CreateDialog::_notification(int p_what) {
}
} break;
case NOTIFICATION_POPUP_HIDE: {
- EditorSettings::get_singleton()->set("interface/dialogs/create_new_node_bounds", get_rect());
+ EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "create_new_node", get_rect());
} break;
}
}
@@ -558,6 +561,7 @@ void CreateDialog::_history_selected() {
return;
search_box->set_text(item->get_text(0).get_slicec(' ', 0));
+ favorites->deselect_all();
_update_search();
}
@@ -568,6 +572,7 @@ void CreateDialog::_favorite_selected() {
return;
search_box->set_text(item->get_text(0).get_slicec(' ', 0));
+ recent->deselect_all();
_update_search();
}