Redo of the project state, implementation of Undo/Redo stack compression

This commit is contained in:
Vojtech Bubnik 2021-09-29 16:43:07 +02:00 committed by Lukas Matena
parent 96f4d71c71
commit 1f3b272d77
9 changed files with 222 additions and 376 deletions

View file

@ -1220,13 +1220,15 @@ bool GLGizmosManager::activate_gizmo(EType type)
if (! m_parent.get_gizmos_manager().is_serializing()
&& old_gizmo->wants_enter_leave_snapshots())
Plater::TakeSnapshot snapshot(wxGetApp().plater(),
Slic3r::format(_utf8("Leaving %1%"), old_gizmo->get_name(false)));
Slic3r::format(_utf8("Leaving %1%"), old_gizmo->get_name(false)),
UndoRedo::SnapshotType::LeavingGizmoWithAction);
}
if (new_gizmo && ! m_parent.get_gizmos_manager().is_serializing()
&& new_gizmo->wants_enter_leave_snapshots())
Plater::TakeSnapshot snapshot(wxGetApp().plater(),
Slic3r::format(_utf8("Entering %1%"), new_gizmo->get_name(false)));
Slic3r::format(_utf8("Entering %1%"), new_gizmo->get_name(false)),
UndoRedo::SnapshotType::EnteringGizmo);
m_current = type;