diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index ce22385e1..325681a09 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -4975,15 +4975,22 @@ std::vector Plater::priv::load_files(const std::vector& input_ q->on_filaments_change(preset_bundle->filament_presets.size()); is_project_file = true; - //BBS: rewrite wipe tower pos stored in 3mf file , the code above should be seriously reconsidered + DynamicConfig& proj_cfg = preset_bundle->project_config; + // do some post process after loading config { - DynamicConfig& proj_cfg = wxGetApp().preset_bundle->project_config; - ConfigOptionFloats* wipe_tower_x = proj_cfg.opt("wipe_tower_x"); + //BBS: rewrite wipe tower pos stored in 3mf file , the code above should be seriously reconsidered + ConfigOptionFloats* wipe_tower_x = proj_cfg.opt("wipe_tower_x"); ConfigOptionFloats* wipe_tower_y = proj_cfg.opt("wipe_tower_y"); if (file_wipe_tower_x) *wipe_tower_x = *file_wipe_tower_x; if (file_wipe_tower_y) *wipe_tower_y = *file_wipe_tower_y; + + ConfigOptionStrings* filament_color = proj_cfg.opt("filament_colour"); + ConfigOptionInts* filament_map = proj_cfg.opt("filament_map", true); + if (filament_color && filament_color->size() != filament_map->size()) { + filament_map->values.resize(filament_color->size(), 1); + } } } }