mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Modified logic to add snapshots to undo/redo stack using GLCanvas::do_xxxxxx() methods
This commit is contained in:
parent
7b6229289d
commit
d4914441f3
5 changed files with 50 additions and 34 deletions
|
@ -600,9 +600,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt, GLCanvas3D& canvas)
|
|||
if (m_current == Flatten)
|
||||
{
|
||||
// Rotate the object so the normal points downward:
|
||||
wxGetApp().plater()->take_snapshot(_(L("Place on Face")));
|
||||
selection.flattening_rotate(get_flattening_normal());
|
||||
canvas.do_flatten();
|
||||
canvas.do_flatten(get_flattening_normal(), "Place on Face");
|
||||
wxGetApp().obj_manipul()->set_dirty();
|
||||
}
|
||||
|
||||
|
@ -674,20 +672,18 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt, GLCanvas3D& canvas)
|
|||
{
|
||||
case Move:
|
||||
{
|
||||
wxGetApp().plater()->take_snapshot(_(L("Move Object")));
|
||||
canvas.disable_regenerate_volumes();
|
||||
canvas.do_move();
|
||||
canvas.do_move("Gizmo-Move Object");
|
||||
break;
|
||||
}
|
||||
case Scale:
|
||||
{
|
||||
canvas.do_scale();
|
||||
canvas.do_scale("Gizmo-Scale Object");
|
||||
break;
|
||||
}
|
||||
case Rotate:
|
||||
{
|
||||
wxGetApp().plater()->take_snapshot(_(L("Rotate Object")));
|
||||
canvas.do_rotate();
|
||||
canvas.do_rotate("Gizmo-Rotate Object");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue