Fixed encoding of gizmo entering/leaving undo redo snapshots,

which was broken by adding an extra TakeSnapshot overload in 41dc265
This commit is contained in:
Lukas Matena 2021-10-29 21:47:47 +02:00
parent 5f84c504fc
commit a01ab28e4c
7 changed files with 7 additions and 13 deletions

View file

@ -1234,14 +1234,16 @@ 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(_CTX_utf8("Leaving %1%", "undo/redo action name, placeholder "
"expands to a name of a gizmo being closed"), 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(_CTX_utf8("Entering %1%", "undo/redo action name, placeholder "
"expands to a name of a gizmo being opened"), new_gizmo->get_name(false)),
UndoRedo::SnapshotType::EnteringGizmo);
m_current = type;