diff options
Diffstat (limited to 'editor/editor_help_search.cpp')
-rw-r--r-- | editor/editor_help_search.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 4e4c5143f2..a9f7be0fff 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -130,7 +130,7 @@ 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_project_metadata("dialog_bounds", "search_help", get_rect()); } break; @@ -579,18 +579,12 @@ bool EditorHelpSearch::Runner::work(uint64_t slot) { return true; } -EditorHelpSearch::Runner::Runner(Control *p_icon_service, Tree *p_results_tree, const String &p_term, int p_search_flags) { - - ui_service = p_icon_service; - results_tree = p_results_tree; - term = p_term.strip_edges(); - search_flags = p_search_flags; - - if ((search_flags & SEARCH_CASE_SENSITIVE) == 0) - term = term.to_lower(); - - empty_icon = ui_service->get_icon("ArrowRight", "EditorIcons"); - disabled_color = ui_service->get_color("disabled_font_color", "Editor"); - - phase = 0; +EditorHelpSearch::Runner::Runner(Control *p_icon_service, Tree *p_results_tree, const String &p_term, int p_search_flags) : + phase(0), + ui_service(p_icon_service), + results_tree(p_results_tree), + term((p_search_flags & SEARCH_CASE_SENSITIVE) == 0 ? p_term.strip_edges().to_lower() : p_term.strip_edges()), + search_flags(p_search_flags), + empty_icon(ui_service->get_icon("ArrowRight", "EditorIcons")), + disabled_color(ui_service->get_color("disabled_font_color", "Editor")) { } |