diff options
Diffstat (limited to 'editor/editor_help_search.cpp')
-rw-r--r-- | editor/editor_help_search.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 8676dac921..d6dc812d38 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -130,9 +130,9 @@ void EditorHelpSearch::_notification(int p_what) { } break; case NOTIFICATION_POPUP_HIDE: { - results_tree->clear(); + results_tree->call_deferred("clear"); // Wait for the Tree's mouse event propagation. get_ok()->set_disabled(true); - EditorSettings::get_singleton()->set("interface/dialogs/search_help_bounds", get_rect()); + EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "search_help", get_rect()); } break; case NOTIFICATION_PROCESS: { @@ -177,8 +177,9 @@ void EditorHelpSearch::popup_dialog() { void EditorHelpSearch::popup_dialog(const String &p_term) { // Restore valid window bounds or pop up at default size. - if (EditorSettings::get_singleton()->has_setting("interface/dialogs/search_help_bounds")) - popup(EditorSettings::get_singleton()->get("interface/dialogs/search_help_bounds")); + Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "search_help", Rect2()); + if (saved_size != Rect2()) + popup(saved_size); else popup_centered_ratio(0.5F); |