mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Improvements for extruder selector (added possibility to create combobox with thin icons)
Call of an update extruder selector after a change of extruder or filament color
This commit is contained in:
parent
2a5cf689a4
commit
398d20c79b
5 changed files with 26 additions and 15 deletions
|
@ -4868,6 +4868,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->preview->update_extruder_selector();
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
continue;
|
||||
}
|
||||
|
@ -4894,6 +4895,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->preview->update_extruder_selector();
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
} else if(opt_key == "max_print_height") {
|
||||
update_scheduled = true;
|
||||
|
@ -4945,6 +4947,7 @@ void Plater::force_filament_colors_update()
|
|||
|
||||
if (update_scheduled) {
|
||||
update();
|
||||
p->preview->update_extruder_selector();
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue