diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp index 4929714a2..69966b0f2 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp @@ -18,9 +18,6 @@ protected: std::string on_get_name() const override; wxString handle_snapshot_action_name(bool shift_down, Button button_down) const override; - - std::string get_gizmo_entering_text() const override { return _u8L("Entering Paint-on supports"); } - std::string get_gizmo_leaving_text() const override { return _u8L("Leaving Paint-on supports"); } std::string get_action_snapshot_name() override { return _u8L("Paint-on supports editing"); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp index 0991527f1..e5336869e 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp @@ -111,9 +111,6 @@ protected: bool on_is_activable() const override; wxString handle_snapshot_action_name(bool shift_down, Button button_down) const override; - - std::string get_gizmo_entering_text() const override { return _u8L("Entering Multimaterial painting"); } - std::string get_gizmo_leaving_text() const override { return _u8L("Leaving Multimaterial painting"); } std::string get_action_snapshot_name() override { return _u8L("Multimaterial painting editing"); } size_t m_first_selected_extruder_idx = 0; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp index eb09715da..819550c89 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp @@ -230,9 +230,6 @@ protected: virtual wxString handle_snapshot_action_name(bool shift_down, Button button_down) const = 0; - virtual std::string get_gizmo_entering_text() const = 0; - virtual std::string get_gizmo_leaving_text() const = 0; - friend class ::Slic3r::GUI::GLGizmoMmuSegmentation; }; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp b/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp index 408c2ec4c..624a197bd 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp @@ -20,8 +20,6 @@ protected: wxString handle_snapshot_action_name(bool shift_down, Button button_down) const override; - std::string get_gizmo_entering_text() const override { return _u8L("Entering Seam painting"); } - std::string get_gizmo_leaving_text() const override { return _u8L("Leaving Seam painting"); } std::string get_action_snapshot_name() override { return _u8L("Paint-on seam editing"); } private: diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp index 316f80036..2ff554ec8 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp @@ -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; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index f138c0af1..ec09ac1ad 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -6860,6 +6860,8 @@ bool Plater::is_render_statistic_dialog_visible() const Plater::TakeSnapshot::TakeSnapshot(Plater *plater, const std::string &snapshot_name) : TakeSnapshot(plater, from_u8(snapshot_name)) {} +Plater::TakeSnapshot::TakeSnapshot(Plater* plater, const std::string& snapshot_name, UndoRedo::SnapshotType snapshot_type) +: TakeSnapshot(plater, from_u8(snapshot_name), snapshot_type) {} // Wrapper around wxWindow::PopupMenu to suppress error messages popping out while tracking the popup menu. diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 0e9d28c1a..8bc683635 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -394,6 +394,7 @@ public: m_plater->take_snapshot(snapshot_name); m_plater->suppress_snapshots(); } + TakeSnapshot(Plater* plater, const std::string& snapshot_name, UndoRedo::SnapshotType snapshot_type); TakeSnapshot(Plater *plater, const wxString &snapshot_name, UndoRedo::SnapshotType snapshot_type) : m_plater(plater) { m_plater->take_snapshot(snapshot_name, snapshot_type);