mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 05:12:00 +08:00
SPE-1838: Remove custom supports, seams, and multi-material painting from an embossed text when the geometry of the embossed text changes.
This commit is contained in:
parent
8601d829d7
commit
aaf14f94bb
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user