Fixed a crash on language switch, when slicing is in a progress

+ Commented assert in update_background_process()
This commit is contained in:
YuSanka 2024-12-18 11:16:39 +01:00
parent fb2ae2d877
commit 7a01f7b26d

View File

@ -1885,6 +1885,8 @@ void Plater::priv::selection_changed()
void Plater::priv::object_list_changed() void Plater::priv::object_list_changed()
{ {
if (!wxGetApp().plater())
return;
const bool export_in_progress = this->background_process.is_export_scheduled(); // || ! send_gcode_file.empty()); const bool export_in_progress = this->background_process.is_export_scheduled(); // || ! send_gcode_file.empty());
// //
if (printer_technology == ptFFF) { if (printer_technology == ptFFF) {
@ -2253,7 +2255,7 @@ void Plater::priv::regenerate_thumbnails(SimpleEvent&) {
// Returns a bitmask of UpdateBackgroundProcessReturnState. // Returns a bitmask of UpdateBackgroundProcessReturnState.
unsigned int Plater::priv::update_background_process(bool force_validation, bool postpone_error_messages) unsigned int Plater::priv::update_background_process(bool force_validation, bool postpone_error_messages)
{ {
assert(! s_beds_just_switched || background_process.idle()); // assert(! s_beds_just_switched || background_process.idle());
int active_bed = s_multiple_beds.get_active_bed(); int active_bed = s_multiple_beds.get_active_bed();
background_process.set_temp_output_path(active_bed); background_process.set_temp_output_path(active_bed);