Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/slic3r/GUI/NotificationManager.cpp')
-rw-r--r--src/slic3r/GUI/NotificationManager.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/slic3r/GUI/NotificationManager.cpp b/src/slic3r/GUI/NotificationManager.cpp
index dfca32b7a..3bcd38ab8 100644
--- a/src/slic3r/GUI/NotificationManager.cpp
+++ b/src/slic3r/GUI/NotificationManager.cpp
@@ -1204,11 +1204,19 @@ bool NotificationManager::push_notification_data(std::unique_ptr<NotificationMan
if (this->activate_existing(notification.get())) {
m_pop_notifications.back()->update(notification->get_data());
- canvas.request_extra_frame_delayed(33);
+ //request_extra_frame_delayed has to run from main thread
+ if (wxThread::IsMain())
+ canvas.request_extra_frame_delayed(33);
+ else
+ wxGetApp().CallAfter([&canvas]() { canvas.request_extra_frame_delayed(33); });
return false;
} else {
m_pop_notifications.emplace_back(std::move(notification));
- canvas.request_extra_frame_delayed(33);
+ //request_extra_frame_delayed has to run from main thread
+ if (wxThread::IsMain())
+ canvas.request_extra_frame_delayed(33);
+ else
+ wxGetApp().CallAfter([&canvas]() { canvas.request_extra_frame_delayed(33); });
return true;
}
}