diff --git a/src/slic3r/GUI/NotificationManager.cpp b/src/slic3r/GUI/NotificationManager.cpp index c80ecfc..055e480 100644 --- a/src/slic3r/GUI/NotificationManager.cpp +++ b/src/slic3r/GUI/NotificationManager.cpp @@ -2841,15 +2841,41 @@ bool NotificationManager::update_notifications(GLCanvas3D& canvas) } } // update state of all notif and erase finished +//Y9 + bool export_on_going = false; + bool export_finished = false; + std::string message = "12"; for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) { std::unique_ptr& notification = *it; request_render |= notification->update_state(hover, time_since_render); next_render = std::min(next_render, notification->next_render()); +//Y9 + if (notification->get_data().type == NotificationType::ExportFinished) + { + export_finished = true; + export_on_going = false; + } if (notification->get_state() == PopNotification::EState::Finished) + { + if (!export_finished) + { + if (notification->get_data().type == NotificationType::ExportOngoing) + { + message = notification->get_data().text1; + export_on_going = true; + } + } it = m_pop_notifications.erase(it); + } else ++it; } +//Y9 + if (export_on_going) + { + message = message + "."; + push_notification(NotificationType::ExportOngoing, NotificationManager::NotificationLevel::ProgressBarNotificationLevel, message); + } // delayed notifications for (auto it = m_waiting_notifications.begin(); it != m_waiting_notifications.end();) { diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 5c2d2ba..c49f823 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3461,7 +3461,9 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova show_warning_dialog = true; if (! output_path.empty()) { background_process.schedule_export(output_path.string(), output_path_on_removable_media); - notification_manager->push_delayed_notification(NotificationType::ExportOngoing, []() {return true; }, 1000, 0); +//Y9 + //notification_manager->push_delayed_notification(NotificationType::ExportOngoing, []() {return true; }, 1000, 0); + notification_manager->push_notification(NotificationType::ExportOngoing, NotificationManager::NotificationLevel::ProgressBarNotificationLevel, "aaa"); } else { background_process.schedule_upload(std::move(upload_job)); }