FIX: [STUDIO-2323] force colors the same number as filaments

Change-Id: Ib57fccc0961cb680502aad6ef039c637cffe0f6b
This commit is contained in:
chunmao.guo 2023-02-23 14:26:53 +08:00 committed by Lane.Wei
parent 5cdd515a9b
commit 06daf3bc45

View file

@ -1305,8 +1305,9 @@ void PresetBundle::load_selections(AppConfig &config, const PresetPreferences& p
std::vector<std::string> filament_colors;
if (config.has("presets", "filament_colors")) {
boost::algorithm::split(filament_colors, config.get("presets", "filament_colors"), boost::algorithm::is_any_of(","));
project_config.option<ConfigOptionStrings>("filament_colour")->values = filament_colors;
}
filament_colors.resize(filament_presets.size());
project_config.option<ConfigOptionStrings>("filament_colour")->values = filament_colors;
std::vector<std::string> matrix;
if (config.has("presets", "flush_volumes_matrix")) {
boost::algorithm::split(matrix, config.get("presets", "flush_volumes_matrix"), boost::algorithm::is_any_of("|"));