mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00: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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user