mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-31 07:58:43 +03:00
continues to push notification when export gcode
This commit is contained in:
@@ -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<PopNotification>& notification = *it;
|
||||
request_render |= notification->update_state(hover, time_since_render);
|
||||
next_render = std::min<int64_t>(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();) {
|
||||
|
||||
Reference in New Issue
Block a user