mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 17:39:36 +01:00
Fix issues with the new FileSystem dock settings.
This commit is contained in:
parent
a2f1f2925f
commit
4995a4b90c
@ -428,6 +428,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
|
||||
_initial_set("docks/filesystem/always_show_folders", true);
|
||||
_initial_set("docks/filesystem/wide_bottom_panel", false);
|
||||
hints["docks/filesystem/wide_bottom_panel"] = PropertyInfo(Variant::BOOL, "docks/filesystem/wide_bottom_panel", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
|
||||
// Property editor
|
||||
_initial_set("docks/property_editor/auto_refresh_interval", 0.3);
|
||||
|
@ -333,13 +333,24 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
|
||||
}
|
||||
|
||||
void FileSystemDock::set_display_mode(DisplayMode p_display_mode) {
|
||||
if (display_mode != DISPLAY_MODE_WIDE && p_display_mode != DISPLAY_MODE_WIDE) {
|
||||
display_mode = p_display_mode;
|
||||
_update_display_mode(false);
|
||||
}
|
||||
}
|
||||
|
||||
void FileSystemDock::_update_display_mode(bool p_force) {
|
||||
if (old_display_mode == DISPLAY_MODE_WIDE || display_mode == DISPLAY_MODE_WIDE) {
|
||||
// Changing between wide and normal needs restart, ignore
|
||||
|
||||
if (p_force || old_display_mode != display_mode) {
|
||||
tree->ensure_cursor_is_visible();
|
||||
_update_tree(_compute_uncollapsed_paths());
|
||||
_update_file_list(true);
|
||||
}
|
||||
|
||||
old_display_mode = display_mode;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1032,10 +1043,6 @@ void FileSystemDock::_fs_changed() {
|
||||
split_box->show();
|
||||
}
|
||||
|
||||
if (wide_hsplit_box) {
|
||||
wide_hsplit_box->show();
|
||||
}
|
||||
|
||||
if (tree->is_visible()) {
|
||||
_update_tree(_compute_uncollapsed_paths());
|
||||
}
|
||||
@ -1055,10 +1062,6 @@ void FileSystemDock::_set_scanning_mode() {
|
||||
split_box->hide();
|
||||
}
|
||||
|
||||
if (wide_hsplit_box) {
|
||||
wide_hsplit_box->hide();
|
||||
}
|
||||
|
||||
scanning_vb->show();
|
||||
set_process(true);
|
||||
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
||||
|
Loading…
Reference in New Issue
Block a user