Hide slicing notification earlier than 15d288ed1b9accc65f3c063a23a1b94b2ba3989c

This commit is contained in:
David Kocik 2024-12-11 16:40:24 +01:00 committed by Lukas Matena
parent cdde5e87d7
commit 18b7333344

View File

@ -2240,6 +2240,8 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
SlicingStatusEvent evt(EVT_SLICING_UPDATE, 0, status);
on_slicing_update(evt);
s_beds_just_switched = false;
// we hide slicing notification here to prevent empty notification and it will init itself again via the incoming progress (if there is any)
notification_manager->set_slicing_progress_hidden();
notification_manager->close_notification_of_type(NotificationType::ExportOngoing);
q->sidebar().show_sliced_info_sizer(background_process.finished());
}
@ -3108,14 +3110,8 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
// Avoid a race condition
return;
}
if (evt.status.percent < 0 && evt.status.text.empty()) {
// empty text and negative percent means there is a bed switch
// we hide the notification and it will init itself again via the incoming progress (if there is any)
notification_manager->set_slicing_progress_hidden();
} else {
notification_manager->set_slicing_progress_percentage(evt.status.text, (float)evt.status.percent / 100.0f);
}
}
// Check template filaments and add warning
// This is more convinient to do here than in slicing backend, so it happens on "Slicing complete".