From e625845b347b9e6f9518910dd7146a455027429e Mon Sep 17 00:00:00 2001 From: HanifKoh <76276251+HanifKoh@users.noreply.github.com> Date: Mon, 12 Oct 2026 16:02:43 +0800 Subject: [PATCH] Keep Snapshot Suppression for the Whole Object List Edit (#16388) Five Plater::TakeSnapshot guards in GUI_ObjectList were unnamed temporaries, so snapshots were allowed again as soon as the snapshot was taken. Naming them keeps the suppression until the edit is done, as everywhere else. --- src/slic3r/GUI/GUI_ObjectList.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 21210b06b7..4a733d3342 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1617,7 +1617,7 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me int obj_idx, vol_idx; get_selected_item_indexes(obj_idx, vol_idx, item); if (obj_idx != -1) { - Plater::TakeSnapshot(plater, _u8L("Shift objects to bed")); + Plater::TakeSnapshot snapshot(plater, _u8L("Shift objects to bed")); (*m_objects)[obj_idx]->ensure_on_bed(); cnv->reload_scene(true, true); update_info_items(obj_idx); @@ -2779,12 +2779,13 @@ void ObjectList::del_info_item(const int obj_idx, InfoItemType type) GLCanvas3D* cnv = plater->canvas3D(); switch (type) { - case InfoItemType::CustomSupports: + case InfoItemType::CustomSupports: { cnv->get_gizmos_manager().reset_all_states(); - Plater::TakeSnapshot(plater, "Remove support painting"); + Plater::TakeSnapshot snapshot(plater, "Remove support painting"); for (ModelVolume* mv : (*m_objects)[obj_idx]->volumes) mv->supported_facets.reset(); break; + } // BBS: remove CustomSeam @@ -2795,19 +2796,21 @@ void ObjectList::del_info_item(const int obj_idx, InfoItemType type) } break; - case InfoItemType::MmSegmentation: + case InfoItemType::MmSegmentation: { cnv->get_gizmos_manager().reset_all_states(); - Plater::TakeSnapshot(plater, "Remove color painting"); + Plater::TakeSnapshot snapshot(plater, "Remove color painting"); for (ModelVolume* mv : (*m_objects)[obj_idx]->volumes) mv->mmu_segmentation_facets.reset(); break; + } - case InfoItemType::FuzzySkin: + case InfoItemType::FuzzySkin: { cnv->get_gizmos_manager().reset_all_states(); - Plater::TakeSnapshot(plater, _u8L("Remove paint-on fuzzy skin")); + Plater::TakeSnapshot snapshot(plater, _u8L("Remove paint-on fuzzy skin")); for (ModelVolume* mv : (*m_objects)[obj_idx]->volumes) mv->fuzzy_skin_facets.reset(); break; + } // BBS: remove Sinking case InfoItemType::Undef : assert(false); break; @@ -6718,7 +6721,7 @@ void ObjectList::OnEditingStarted(wxDataViewEvent &event) else if (col == colSinking) { Plater * plater = wxGetApp().plater(); GLCanvas3D *cnv = plater->canvas3D(); - Plater::TakeSnapshot(plater, _u8L("Shift objects to bed")); + Plater::TakeSnapshot snapshot(plater, _u8L("Shift objects to bed")); int obj_idx, vol_idx; get_selected_item_indexes(obj_idx, vol_idx, item); (*m_objects)[obj_idx]->ensure_on_bed();