From 1edbdcfecf527a85589a2ec09451a5f8c35a1ab6 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Fri, 1 Oct 2021 15:45:53 +0200 Subject: [PATCH] remove simplify suggestion function --- src/slic3r/GUI/NotificationManager.cpp | 9 +++++++++ src/slic3r/GUI/NotificationManager.hpp | 1 + 2 files changed, 10 insertions(+) diff --git a/src/slic3r/GUI/NotificationManager.cpp b/src/slic3r/GUI/NotificationManager.cpp index 07cf855cc9..3f98bd9037 100644 --- a/src/slic3r/GUI/NotificationManager.cpp +++ b/src/slic3r/GUI/NotificationManager.cpp @@ -1644,6 +1644,15 @@ void NotificationManager::remove_simplify_suggestion_of_released_objects(const s } } +void NotificationManager::remove_simplify_suggestion_with_id(const ObjectID oid) +{ + for (std::unique_ptr& notification : m_pop_notifications) + if (notification->get_type() == NotificationType::SimplifySuggestion) { + if (static_cast(notification.get())->object_id == oid) + notification->close(); + } +} + void NotificationManager::push_exporting_finished_notification(const std::string& path, const std::string& dir_path, bool on_removable) { close_notification_of_type(NotificationType::ExportFinished); diff --git a/src/slic3r/GUI/NotificationManager.hpp b/src/slic3r/GUI/NotificationManager.hpp index 3bd7ae7353..73f6a63405 100644 --- a/src/slic3r/GUI/NotificationManager.hpp +++ b/src/slic3r/GUI/NotificationManager.hpp @@ -174,6 +174,7 @@ public: // Close object warnings, whose ObjectID is not in the list. // living_oids is expected to be sorted. void remove_simplify_suggestion_of_released_objects(const std::vector& living_oids); + void remove_simplify_suggestion_with_id(const ObjectID oid); // Called when the side bar changes its visibility, as the "slicing complete" notification supplements // the "slicing info" normally shown at the side bar. void set_sidebar_collapsed(bool collapsed);