Export ongoing notification with delay 1000ms to prevent quick opening and closing on fast systems

This commit is contained in:
David Kocik 2021-10-15 14:54:43 +02:00
parent 1ca24f0bd0
commit 81cb190e2f
3 changed files with 30 additions and 8 deletions

View file

@ -4025,6 +4025,7 @@ void Plater::priv::on_export_began(wxCommandEvent& evt)
{
if (show_warning_dialog)
warnings_dialog();
notification_manager->push_delayed_notification(NotificationType::ExportOngoing, [](){return true;}, 1000, 1000);
}
void Plater::priv::on_slicing_began()
{
@ -4157,6 +4158,10 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
if(wxGetApp().get_mode() == comSimple) {
show_action_buttons(false);
}
if (exporting_status != ExportingStatus::NOT_EXPORTING && !has_error) {
notification_manager->stop_delayed_notifications_of_type(NotificationType::ExportOngoing);
notification_manager->close_notification_of_type(NotificationType::ExportOngoing);
}
// If writing to removable drive was scheduled, show notification with eject button
if (exporting_status == ExportingStatus::EXPORTING_TO_REMOVABLE && !has_error) {
show_action_buttons(false);