summaryrefslogtreecommitdiff
path: root/editor/settings_config_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/settings_config_dialog.cpp')
-rw-r--r--editor/settings_config_dialog.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index fe384da75b..a4956bee27 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -94,8 +94,9 @@ void EditorSettingsDialog::popup_edit_settings() {
set_process_unhandled_input(true);
// Restore valid window bounds or pop up at default size.
- if (EditorSettings::get_singleton()->has_setting("interface/dialogs/editor_settings_bounds")) {
- popup(EditorSettings::get_singleton()->get("interface/dialogs/editor_settings_bounds"));
+ Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "editor_settings", Rect2());
+ if (saved_size != Rect2()) {
+ popup(saved_size);
} else {
Size2 popup_size = Size2(900, 700) * editor_get_scale();
@@ -132,7 +133,7 @@ void EditorSettingsDialog::_notification(int p_what) {
_update_icons();
} break;
case NOTIFICATION_POPUP_HIDE: {
- EditorSettings::get_singleton()->set("interface/dialogs/editor_settings_bounds", get_rect());
+ EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "editor_settings", get_rect());
set_process_unhandled_input(false);
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
@@ -361,7 +362,7 @@ void EditorSettingsDialog::_tabs_tab_changed(int p_tab) {
void EditorSettingsDialog::_focus_current_search_box() {
Control *tab = tabs->get_current_tab_control();
- LineEdit *current_search_box;
+ LineEdit *current_search_box = NULL;
if (tab == tab_general)
current_search_box = search_box;
else if (tab == tab_shortcuts)