From 9c4494637cff2fc7551dac9eae01d37b257d8eac Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Mon, 27 Sep 2021 14:32:09 +0200 Subject: [PATCH] WIP Undo / Redo and project state: Marking Undo / Redo snapshots with their purpose. Follow-up to 41dc265a45196fd6a8f2b79ac6e803f41cbe22f8 --- src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp | 3 ++- src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp index 474e316318..aa3d249c8b 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp @@ -57,7 +57,8 @@ void GLGizmoPainterBase::activate_internal_undo_redo_stack(bool activate) m_internal_stack_active = true; } if (!activate && m_internal_stack_active) { - bool project_modified = plater->leave_gizmos_stack(); + //FIXME report the true state! + bool project_modified = true; // plater->leave_gizmos_stack(); std::string str = get_painter_type() == PainterGizmoType::SEAM ? _u8L("Leaving Seam painting") : _u8L("Leaving Paint-on supports"); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index 9a3bd5a426..835e69acb5 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -926,9 +926,10 @@ void GLGizmoSlaSupports::on_set_state() } else { // we are actually shutting down - bool project_modified = disable_editing_mode(); // so it is not active next time the gizmo opens + //FIXME report the true state! + bool project_modified = true; // disable_editing_mode(); // so it is not active next time the gizmo opens Plater::TakeSnapshot snapshot(wxGetApp().plater(), _L("Leaving SLA gizmo"), - project_modified ? UndoRedo::SnapshotType::LeavingGizmoWithAction : UndoRedo::SnapshotType::LeavingGizmoNo); + project_modified ? UndoRedo::SnapshotType::LeavingGizmoWithAction : UndoRedo::SnapshotType::LeavingGizmoNoAction); m_normal_cache.clear(); m_old_mo_id = -1; }