SPE-2605: Prevent empty slicing notification when switching beds.

This commit is contained in:
David Kocik 2024-12-11 09:35:29 +01:00 committed by Lukas Matena
parent b732a5b744
commit cdde5e87d7

View File

@ -3108,7 +3108,13 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
// Avoid a race condition
return;
}
notification_manager->set_slicing_progress_percentage(evt.status.text, (float)evt.status.percent / 100.0f);
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