diff options
Diffstat (limited to 'editor/quick_open.cpp')
-rw-r--r-- | editor/quick_open.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index 26dd931321..8dacc3c142 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -30,9 +30,9 @@ #include "quick_open.h" -#include "os/keyboard.h" +#include "core/os/keyboard.h" -void EditorQuickOpen::popup(const StringName &p_base, bool p_enable_multi, bool p_add_dirs, bool p_dontclear) { +void EditorQuickOpen::popup_dialog(const StringName &p_base, bool p_enable_multi, bool p_add_dirs, bool p_dontclear) { add_directories = p_add_dirs; popup_centered_ratio(0.6); @@ -195,7 +195,7 @@ Vector<Pair<String, Ref<Texture> > > EditorQuickOpen::_sort_fs(Vector<Pair<Strin Vector<float> scores; scores.resize(list.size()); for (int i = 0; i < list.size(); i++) - scores[i] = _path_cmp(search_text, list[i].first); + scores.write[i] = _path_cmp(search_text, list[i].first); while (list.size() > 0) { @@ -258,6 +258,11 @@ void EditorQuickOpen::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { connect("confirmed", this, "_confirmed"); + + search_box->set_right_icon(get_icon("Search", "EditorIcons")); + search_box->set_clear_button_enabled(true); + } else if (p_what == NOTIFICATION_EXIT_TREE) { + disconnect("confirmed", this, "_confirmed"); } } |