From 86b2817da5581553652506fe413c3c68a4a4de42 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 27 Aug 2019 12:15:29 +0200 Subject: [PATCH] Fix of a regression issue since ee38d80318e9054da4bab817de43c15563edd56b 1) load object 2) Switch FFF to SLA or vice versa 3) Undo -> Crash Fixed by deselecting the side panel before loading profiles of the other technology. --- src/slic3r/GUI/Plater.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 4fc5341b6c..460b5b0de9 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3946,6 +3946,9 @@ void Plater::priv::undo_redo_to(std::vector::const_iterator AppConfig *app_config = wxGetApp().app_config; app_config->set("presets", "printer", (new_printer_technology == ptFFF) ? m_last_fff_printer_profile_name : m_last_sla_printer_profile_name); wxGetApp().preset_bundle->load_presets(*app_config); + // load_current_presets() calls Tab::load_current_preset() -> TabPrint::update() -> Object_list::update_and_show_object_settings_item(), + // but the Object list still keeps pointer to the old Model. Avoid a crash by removing selection first. + this->sidebar->obj_list()->unselect_objects(); // Load the currently selected preset into the GUI, update the preset selection box. // This also switches the printer technology based on the printer technology of the active printer profile. wxGetApp().load_current_presets();