diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-07-09 11:18:57 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-07-09 11:18:57 +0300 |
commit | d4914441f3dc5038c1599fb92561502d260d05ab (patch) | |
tree | b9f5a9181c2884f4e9d57d8094c37ee7e087d3c4 /src/slic3r/GUI/GUI_ObjectManipulation.cpp | |
parent | 7b6229289d144d1f24feb53cda31973a64e34ff8 (diff) |
Modified logic to add snapshots to undo/redo stack using GLCanvas::do_xxxxxx() methods
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.cpp')
-rw-r--r-- | src/slic3r/GUI/GUI_ObjectManipulation.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index ec5272a44..787c92451 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -220,8 +220,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : selection.synchronize_unselected_instances(Selection::SYNC_ROTATION_GENERAL); selection.synchronize_unselected_volumes(); // Copy mirroring values from GLVolumes into Model (ModelInstance / ModelVolume), trigger background processing. - canvas->do_mirror(); - canvas->set_as_dirty(); + canvas->do_mirror("Set Mirror"); UpdateAndShow(true); }); return sizer; @@ -302,8 +301,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : selection.synchronize_unselected_instances(Selection::SYNC_ROTATION_GENERAL); selection.synchronize_unselected_volumes(); // Copy rotation values from GLVolumes into Model (ModelInstance / ModelVolume), trigger background processing. - wxGetApp().plater()->take_snapshot(_(L("Set Rotation"))); - canvas->do_rotate(); + canvas->do_rotate("Set Rotation"); UpdateAndShow(true); }); @@ -656,8 +654,7 @@ void ObjectManipulation::change_position_value(int axis, double value) Selection& selection = canvas->get_selection(); selection.start_dragging(); selection.translate(position - m_cache.position, selection.requires_local_axes()); - wxGetApp().plater()->take_snapshot(_(L("Set Position"))); - canvas->do_move(); + canvas->do_move("Set Position"); m_cache.position = position; m_cache.position_rounded(axis) = DBL_MAX; @@ -688,8 +685,7 @@ void ObjectManipulation::change_rotation_value(int axis, double value) selection.rotate( (M_PI / 180.0) * (transformation_type.absolute() ? rotation : rotation - m_cache.rotation), transformation_type); - wxGetApp().plater()->take_snapshot(_(L("Set Orientation"))); - canvas->do_rotate(); + canvas->do_rotate("Set Orientation"); m_cache.rotation = rotation; m_cache.rotation_rounded(axis) = DBL_MAX; @@ -754,7 +750,7 @@ void ObjectManipulation::do_scale(int axis, const Vec3d &scale) const selection.start_dragging(); selection.scale(scaling_factor * 0.01, transformation_type); - wxGetApp().plater()->canvas3D()->do_scale(); + wxGetApp().plater()->canvas3D()->do_scale("Set Scale"); } void ObjectManipulation::on_change(t_config_option_key opt_key, const boost::any& value) |