diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 9574cdb8e..c6f5cfb47 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -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(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(); } } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 37ea24a16..b6ea8cbc3 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5376,6 +5376,13 @@ void Plater::force_filament_colors_update() this->p->schedule_background_process(); } +void Plater::force_print_bed_update() +{ + // Fill in the printer model key with something which cannot possibly be valid, so that Plater::on_config_change() will update the print bed + // once a new Printer profile config is loaded. + p->config->opt_string("printer_model", true) = "\x01\x00\x01"; +} + void Plater::on_activate() { #ifdef __linux__ @@ -5392,11 +5399,6 @@ void Plater::on_activate() this->p->show_delayed_error_message(); } -const DynamicPrintConfig* Plater::get_plater_config() const -{ - return p->config; -} - // Get vector of extruder colors considering filament color, if extruder color is undefined. std::vector Plater::get_extruder_colors_from_plater_config() const { diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 9639a1693..0d5062993 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -227,9 +227,9 @@ public: void on_extruders_change(size_t extruders_count); void on_config_change(const DynamicPrintConfig &config); void force_filament_colors_update(); + void force_print_bed_update(); // On activating the parent window. void on_activate(); - const DynamicPrintConfig* get_plater_config() const; std::vector get_extruder_colors_from_plater_config() const; std::vector get_colors_for_color_print() const; diff --git a/src/slic3r/GUI/PresetBundle.hpp b/src/slic3r/GUI/PresetBundle.hpp index ff27d0023..037c47c5f 100644 --- a/src/slic3r/GUI/PresetBundle.hpp +++ b/src/slic3r/GUI/PresetBundle.hpp @@ -54,8 +54,7 @@ public: // There will be an entry for each system profile loaded, // and the system profiles will point to the VendorProfile instances owned by PresetBundle::vendors. - // std::set vendors; - VendorMap vendors; + VendorMap vendors; struct ObsoletePresets { std::vector prints;