From adeab9b4607bf33eb6bf6da36ba330f577ab3035 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 14 Oct 2020 17:51:51 +0200 Subject: [PATCH] Fixed bugs introduced in refactoring of NotificationManager. --- src/slic3r/GUI/NotificationManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/NotificationManager.cpp b/src/slic3r/GUI/NotificationManager.cpp index 64bafd37bc..9e6438ca43 100644 --- a/src/slic3r/GUI/NotificationManager.cpp +++ b/src/slic3r/GUI/NotificationManager.cpp @@ -678,7 +678,7 @@ void NotificationManager::push_slicing_warning_notification(const std::string& t notification->object_id = oid; notification->warning_step = warning_step; if (push_notification_data(std::move(notification), canvas, 0)) { - notification->set_gray(gray); + m_pop_notifications.back()->set_gray(gray); } } void NotificationManager::push_plater_error_notification(const std::string& text, GLCanvas3D& canvas) @@ -824,7 +824,7 @@ void NotificationManager::render_notifications(GLCanvas3D& canvas, float overlay sort_notifications(); // iterate thru notifications and render them / erease them for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) { - if (! (*it)->get_finished()) { + if ((*it)->get_finished()) { it = m_pop_notifications.erase(it); } else { (*it)->set_paused(m_hovered);