diff options
| author | Rémi Verschelde | 2015-12-07 20:40:58 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2015-12-07 20:40:58 +0100 |
| commit | 2cc60386d83d06e3b2005f0d2e3094eebfb9e382 (patch) | |
| tree | 80bb4ff6938fd851a256c684323c1a94ff52deb3 /tools/editor/editor_file_dialog.cpp | |
| parent | c667bde1834c24e6247145010a6c70b955c834c6 (diff) | |
| parent | 42eef3cdc65165af852dc256cabf2cadb2caf79e (diff) | |
| download | godot-2cc60386d83d06e3b2005f0d2e3094eebfb9e382.tar.gz godot-2cc60386d83d06e3b2005f0d2e3094eebfb9e382.tar.zst godot-2cc60386d83d06e3b2005f0d2e3094eebfb9e382.zip | |
Merge pull request #3005 from TheHX/pr-file-dialog
Better hidden folders display preferences for editor file dialogs
Diffstat (limited to '')
| -rw-r--r-- | tools/editor/editor_file_dialog.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 66b38e2f0..104539c30 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -34,8 +34,7 @@ void EditorFileDialog::_notification(int p_what) { fav_down->set_icon(get_icon("MoveDown","EditorIcons")); fav_rm->set_icon(get_icon("RemoveSmall","EditorIcons")); - } - if (p_what==NOTIFICATION_PROCESS) { + } else if (p_what==NOTIFICATION_PROCESS) { if (preview_waiting) { preview_wheel_timeout-=get_process_delta_time(); @@ -48,12 +47,17 @@ void EditorFileDialog::_notification(int p_what) { preview_wheel_timeout=0.1; } } - } - - if (p_what==NOTIFICATION_DRAW) { + } else if (p_what==NOTIFICATION_DRAW) { //RID ci = get_canvas_item(); //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); + } else if (p_what==EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { + + bool show_hidden = EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"); + + if (show_hidden != show_hidden_files) { + set_show_hidden_files(show_hidden); + } } } @@ -1013,7 +1017,7 @@ void EditorFileDialog::_go_forward(){ } -bool EditorFileDialog::default_show_hidden_files=true; +bool EditorFileDialog::default_show_hidden_files=false; void EditorFileDialog::set_display_mode(DisplayMode p_mode) { @@ -1142,7 +1146,7 @@ void EditorFileDialog::_save_to_recent() { EditorFileDialog::EditorFileDialog() { - show_hidden_files=true; + show_hidden_files=default_show_hidden_files; display_mode=DISPLAY_THUMBNAILS; local_history_pos=0; |
