Skip to content

Commit

Permalink
Fix saving editor folder colors
Browse files Browse the repository at this point in the history
Also clears setting if none are assigned
  • Loading branch information
AThousandShips committed Sep 5, 2023
1 parent 332bc46 commit 1083ce4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/filesystem_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 1083ce4

Please sign in to comment.