From 1569dad5de053920328fc9888afdadcfb62df0aa Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 15 Mar 2021 09:54:24 +0100 Subject: [PATCH] Auto color change: Fixed show/hide for the notification. --- src/slic3r/GUI/GUI_Preview.cpp | 6 +++--- src/slic3r/GUI/Plater.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index da7d7810a..9f9f20ffb 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -645,7 +645,7 @@ void Preview::update_layers_slider(const std::vector& layers_z, bool kee if (ticks_info_from_model.gcodes.empty()) { NotificationManager* notif_mngr = wxGetApp().plater()->get_notification_manager(); -// notif_mngr->close_notification_of_type(NotificationType::SignDetected); + notif_mngr->close_notification_of_type(NotificationType::SignDetected); const Print& print = wxGetApp().plater()->fff_print(); double delta_area = scale_(scale_(25)); // equal to 25 mm2 @@ -675,8 +675,8 @@ void Preview::update_layers_slider(const std::vector& layers_z, bool kee NotificationType::SignDetected, NotificationManager::NotificationLevel::RegularNotification, _u8L("NOTE:") + "\n" + _u8L("Sliced object looks like the sign") + "\n", _u8L("Apply auto color change to print"), - [this/*, notif_mngr*/](wxEvtHandler*) { - // notif_mngr->close_notification_of_type(NotificationType::SignDetected); + [this, notif_mngr](wxEvtHandler*) { + notif_mngr->close_notification_of_type(NotificationType::SignDetected); m_layers_slider->auto_color_change(); return true; }); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 3d4d381fb..c6b3ed89f 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3563,6 +3563,7 @@ void Plater::priv::on_slicing_began() { clear_warnings(); notification_manager->close_notification_of_type(NotificationType::SlicingComplete); + notification_manager->close_notification_of_type(NotificationType::SignDetected); } void Plater::priv::add_warning(const Slic3r::PrintStateBase::Warning& warning, size_t oid) {