Auto color change: Fixed show/hide for the notification.

This commit is contained in:
YuSanka 2021-03-15 09:54:24 +01:00
parent ffb13767f4
commit 1569dad5de
2 changed files with 4 additions and 3 deletions

View File

@ -645,7 +645,7 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
if (ticks_info_from_model.gcodes.empty()) if (ticks_info_from_model.gcodes.empty())
{ {
NotificationManager* notif_mngr = wxGetApp().plater()->get_notification_manager(); 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(); const Print& print = wxGetApp().plater()->fff_print();
double delta_area = scale_(scale_(25)); // equal to 25 mm2 double delta_area = scale_(scale_(25)); // equal to 25 mm2
@ -675,8 +675,8 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
NotificationType::SignDetected, NotificationManager::NotificationLevel::RegularNotification, NotificationType::SignDetected, NotificationManager::NotificationLevel::RegularNotification,
_u8L("NOTE:") + "\n" + _u8L("Sliced object looks like the sign") + "\n", _u8L("NOTE:") + "\n" + _u8L("Sliced object looks like the sign") + "\n",
_u8L("Apply auto color change to print"), _u8L("Apply auto color change to print"),
[this/*, notif_mngr*/](wxEvtHandler*) { [this, notif_mngr](wxEvtHandler*) {
// notif_mngr->close_notification_of_type(NotificationType::SignDetected); notif_mngr->close_notification_of_type(NotificationType::SignDetected);
m_layers_slider->auto_color_change(); m_layers_slider->auto_color_change();
return true; return true;
}); });

View File

@ -3563,6 +3563,7 @@ void Plater::priv::on_slicing_began()
{ {
clear_warnings(); clear_warnings();
notification_manager->close_notification_of_type(NotificationType::SlicingComplete); 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) void Plater::priv::add_warning(const Slic3r::PrintStateBase::Warning& warning, size_t oid)
{ {