Forcing a print bed update after config or config bundle is loaded.

The solution is hackish, but a major refactoring would be needed
to avoid multiple refreshes of the print bed, and to avoid
expensive checks at Plater::on_config_change() every time
a config value changes at a parameter tab.
This commit is contained in:
bubnikv 2020-01-24 15:16:28 +01:00
parent fd11dcd44b
commit d937ac1ed3
4 changed files with 13 additions and 9 deletions
src/slic3r/GUI

View file

@ -960,8 +960,11 @@ void GUI_App::load_current_presets()
this->plater()->set_printer_technology(printer_technology);
for (Tab *tab : tabs_list)
if (tab->supports_printer_technology(printer_technology)) {
if (tab->type() == Preset::TYPE_PRINTER)
if (tab->type() == Preset::TYPE_PRINTER) {
static_cast<TabPrinter*>(tab)->update_pages();
// Mark the plater to update print bed by tab->load_current_preset() from Plater::on_config_change().
this->plater()->force_print_bed_update();
}
tab->load_current_preset();
}
}