Fix saving editor folder colors

Also clears setting if none are assigned
This commit is contained in:
A Thousand Ships 2023-09-05 16:42:31 +02:00
parent 332bc469c4
commit 1083ce4466

View file

@ -2794,6 +2794,12 @@ void FileSystemDock::_folder_color_index_pressed(int p_index, PopupMenu *p_menu)
}
}
if (!ProjectSettings::get_singleton()->has_setting("file_customization/folder_colors")) {
ProjectSettings::get_singleton()->set_setting("file_customization/folder_colors", assigned_folder_colors);
} else if (assigned_folder_colors.is_empty()) {
ProjectSettings::get_singleton()->set_setting("file_customization/folder_colors", Variant());
}
ProjectSettings::get_singleton()->save();
_update_tree(get_uncollapsed_paths());