mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Added color for extruder
This commit is contained in:
@@ -4785,6 +4785,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
||||
filament_colors.push_back(filaments.find_preset(filament_preset, true)->config.opt_string("filament_colour", (unsigned)0));
|
||||
|
||||
p->config->option<ConfigOptionStrings>(opt_key)->values = filament_colors;
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -4810,6 +4811,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
||||
else if(opt_key == "extruder_colour") {
|
||||
update_scheduled = true;
|
||||
p->preview->set_number_extruders(p->config->option<ConfigOptionStrings>(opt_key)->values.size());
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
} else if(opt_key == "max_print_height") {
|
||||
update_scheduled = true;
|
||||
}
|
||||
@@ -4858,8 +4860,10 @@ void Plater::force_filament_colors_update()
|
||||
}
|
||||
}
|
||||
|
||||
if (update_scheduled)
|
||||
if (update_scheduled) {
|
||||
update();
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
}
|
||||
|
||||
if (p->main_frame->is_loaded())
|
||||
this->p->schedule_background_process();
|
||||
|
||||
Reference in New Issue
Block a user