diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 66bc232b9c..612a25f364 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -1338,6 +1338,14 @@ bool GLGizmoEmboss::process(bool make_snapshot) if (!start_update_volume(std::move(data), *m_volume, selection, m_raycast_manager)) return false; + wxGetApp().plater()->clear_before_change_volume(*m_volume, _u8L("Custom supports, seams and multimaterial painting were " + "removed after embossed text changed.")); + + // When we changed geometry and removed custom supports, seams, and multimaterial painting + // we have to update info about the object to remove information about custom supports, + // seams, and multimaterial painting from the right panel. + wxGetApp().obj_list()->update_info_items(selection.get_object_idx()); + // notification is removed befor object is changed by job remove_notification_not_valid_font(); return true; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index aa8a840c2e..3e18c4c559 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -6633,6 +6633,20 @@ bool Plater::set_printer_technology(PrinterTechnology printer_technology) return ret; } +void Plater::clear_before_change_volume(ModelVolume &mv, const std::string ¬ification_msg) { + // When we change the geometry of the volume, we remove any custom supports/seams/multi-material painting. + if (const bool paint_removed = !mv.supported_facets.empty() || !mv.seam_facets.empty() || !mv.mm_segmentation_facets.empty(); paint_removed) { + mv.supported_facets.reset(); + mv.seam_facets.reset(); + mv.mm_segmentation_facets.reset(); + + get_notification_manager()->push_notification( + NotificationType::CustomSupportsAndSeamRemovedAfterRepair, + NotificationManager::NotificationLevel::PrintInfoNotificationLevel, + notification_msg); + } +} + void Plater::clear_before_change_mesh(int obj_idx, const std::string ¬ification_msg) { ModelObject* mo = model().objects[obj_idx]; diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 356592ee16..5876cceaaa 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -215,6 +215,7 @@ public: void reslice_FFF_until_step(PrintObjectStep step, const ModelObject &object, bool postpone_error_messages = false); void reslice_SLA_until_step(SLAPrintObjectStep step, const ModelObject &object, bool postpone_error_messages = false); + void clear_before_change_volume(ModelVolume &mv, const std::string ¬ification_msg); void clear_before_change_mesh(int obj_idx, const std::string ¬ification_msg); void changed_mesh(int obj_idx);