mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Added color for extruder
This commit is contained in:
parent
c07a193b4e
commit
d7ebc4de5b
5 changed files with 208 additions and 126 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue