diff options
| author | Rémi Verschelde | 2017-01-21 13:07:29 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-01-21 13:07:32 +0100 |
| commit | c4d6e54e93431e94888c5594386bcd0aa22528ee (patch) | |
| tree | 15a9dd7cad17c04a0dfa19ec12870d1b5804249d /tools/editor/filesystem_dock.cpp | |
| parent | ee0f53df52d88ca57079579f3f3e943e7e40f53a (diff) | |
| download | godot-c4d6e54e93431e94888c5594386bcd0aa22528ee.tar.gz godot-c4d6e54e93431e94888c5594386bcd0aa22528ee.tar.zst godot-c4d6e54e93431e94888c5594386bcd0aa22528ee.zip | |
Remove Quick Filter Files and fix FS search hotkey
The new Quick Filter Files behaviour since 8b47e26 had not been implemented,
so this implements it and makes it an editor hotkey instead of a menu entry.
Fixes #7582.
Diffstat (limited to 'tools/editor/filesystem_dock.cpp')
| -rw-r--r-- | tools/editor/filesystem_dock.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index b85bd6dfd..26a118521 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -170,7 +170,7 @@ void FileSystemDock::_notification(int p_what) { _update_tree(); //maybe it finished already if (EditorFileSystem::get_singleton()->is_scanning()) { - _set_scannig_mode(); + _set_scanning_mode(); } } break; @@ -662,7 +662,7 @@ void FileSystemDock::_fs_changed() { set_process(false); } -void FileSystemDock::_set_scannig_mode() { +void FileSystemDock::_set_scanning_mode() { split_box->hide(); button_hist_prev->set_disabled(true); @@ -1174,7 +1174,7 @@ void FileSystemDock::_search_changed(const String& p_text) { void FileSystemDock::_rescan() { - _set_scannig_mode(); + _set_scanning_mode(); EditorFileSystem::get_singleton()->scan(); } @@ -1186,6 +1186,14 @@ void FileSystemDock::fix_dependencies(const String& p_for_file) { void FileSystemDock::focus_on_filter() { + if (!search_box->is_visible_in_tree()) { + // Tree mode, switch to files list with search box + tree->hide(); + file_list_vb->show(); + button_favorite->hide(); + } + + search_box->grab_focus(); } void FileSystemDock::set_display_mode(int p_mode) { |
