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:
parent
5f84c504fc
commit
a01ab28e4c
@ -18,9 +18,6 @@ protected:
|
|||||||
std::string on_get_name() const override;
|
std::string on_get_name() const override;
|
||||||
|
|
||||||
wxString handle_snapshot_action_name(bool shift_down, Button button_down) 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"); }
|
std::string get_action_snapshot_name() override { return _u8L("Paint-on supports editing"); }
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,9 +111,6 @@ protected:
|
|||||||
bool on_is_activable() const override;
|
bool on_is_activable() const override;
|
||||||
|
|
||||||
wxString handle_snapshot_action_name(bool shift_down, Button button_down) 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"); }
|
std::string get_action_snapshot_name() override { return _u8L("Multimaterial painting editing"); }
|
||||||
|
|
||||||
size_t m_first_selected_extruder_idx = 0;
|
size_t m_first_selected_extruder_idx = 0;
|
||||||
|
@ -230,9 +230,6 @@ protected:
|
|||||||
|
|
||||||
virtual wxString handle_snapshot_action_name(bool shift_down, Button button_down) const = 0;
|
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;
|
friend class ::Slic3r::GUI::GLGizmoMmuSegmentation;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@ protected:
|
|||||||
|
|
||||||
wxString handle_snapshot_action_name(bool shift_down, Button button_down) 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 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"); }
|
std::string get_action_snapshot_name() override { return _u8L("Paint-on seam editing"); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1234,14 +1234,16 @@ bool GLGizmosManager::activate_gizmo(EType type)
|
|||||||
if (! m_parent.get_gizmos_manager().is_serializing()
|
if (! m_parent.get_gizmos_manager().is_serializing()
|
||||||
&& old_gizmo->wants_enter_leave_snapshots())
|
&& old_gizmo->wants_enter_leave_snapshots())
|
||||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(),
|
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);
|
UndoRedo::SnapshotType::LeavingGizmoWithAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_gizmo && ! m_parent.get_gizmos_manager().is_serializing()
|
if (new_gizmo && ! m_parent.get_gizmos_manager().is_serializing()
|
||||||
&& new_gizmo->wants_enter_leave_snapshots())
|
&& new_gizmo->wants_enter_leave_snapshots())
|
||||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(),
|
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);
|
UndoRedo::SnapshotType::EnteringGizmo);
|
||||||
|
|
||||||
m_current = type;
|
m_current = type;
|
||||||
|
@ -6860,6 +6860,8 @@ bool Plater::is_render_statistic_dialog_visible() const
|
|||||||
|
|
||||||
Plater::TakeSnapshot::TakeSnapshot(Plater *plater, const std::string &snapshot_name)
|
Plater::TakeSnapshot::TakeSnapshot(Plater *plater, const std::string &snapshot_name)
|
||||||
: TakeSnapshot(plater, from_u8(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.
|
// Wrapper around wxWindow::PopupMenu to suppress error messages popping out while tracking the popup menu.
|
||||||
|
@ -394,6 +394,7 @@ public:
|
|||||||
m_plater->take_snapshot(snapshot_name);
|
m_plater->take_snapshot(snapshot_name);
|
||||||
m_plater->suppress_snapshots();
|
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)
|
TakeSnapshot(Plater *plater, const wxString &snapshot_name, UndoRedo::SnapshotType snapshot_type) : m_plater(plater)
|
||||||
{
|
{
|
||||||
m_plater->take_snapshot(snapshot_name, snapshot_type);
|
m_plater->take_snapshot(snapshot_name, snapshot_type);
|
||||||
|
Loading…
Reference in New Issue
Block a user