From bf032524ebe8f767836875978c9f9938342c976a Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 3 Mar 2021 09:24:16 +0100 Subject: [PATCH] notifications - minor changes in logic --- src/slic3r/GUI/NotificationManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/NotificationManager.cpp b/src/slic3r/GUI/NotificationManager.cpp index 7e2a6b880..930174e3f 100644 --- a/src/slic3r/GUI/NotificationManager.cpp +++ b/src/slic3r/GUI/NotificationManager.cpp @@ -568,12 +568,12 @@ bool NotificationManager::PopNotification::update_state(bool paused, const int64 m_current_fade_opacity = 1.0f; m_notification_start = now; // Timers when not fading - } else if (m_data.duration != 0 && !paused) { + } else if (m_state != EState::FadingOut && m_data.duration != 0 && !paused) { int64_t up_time = now - m_notification_start; - if (m_state != EState::FadingOut && up_time >= m_data.duration * 1000) { + if (up_time >= m_data.duration * 1000) { m_state = EState::FadingOut; m_fading_start = now; - } else if (m_state != EState::FadingOut) { + } else { m_next_render = m_data.duration * 1000 - up_time; } }