Merge lp:~tapaal-contributor/tapaal/fix-double-undo into lp:tapaal

Proposed by Lena Ernstsen
Status: Merged
Approved by: Jiri Srba
Approved revision: 1129
Merged at revision: 1129
Proposed branch: lp:~tapaal-contributor/tapaal/fix-double-undo
Merge into: lp:tapaal
Diff against target: 19 lines (+6/-4)
1 file modified
src/pipe/gui/canvas/DrawingSurfaceImpl.java (+6/-4)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/fix-double-undo
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Review via email: mp+406576@code.launchpad.net

Commit message

Fixed needing to undo twice for certain actions

To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/pipe/gui/canvas/DrawingSurfaceImpl.java'
--- src/pipe/gui/canvas/DrawingSurfaceImpl.java 2020-08-11 06:00:12 +0000
+++ src/pipe/gui/canvas/DrawingSurfaceImpl.java 2021-08-03 08:45:07 +0000
@@ -495,9 +495,11 @@
495495
496496
497 public void translateSelection(ArrayList<PetriNetObject> objects, int transX, int transY) {497 public void translateSelection(ArrayList<PetriNetObject> objects, int transX, int transY) {
498 tabContent.getUndoManager().newEdit(); // new "transaction""498 if (transX != 0 || transY != 0) {
499 for (PetriNetObject pnobject : objects) {499 tabContent.getUndoManager().newEdit(); // new "transaction""
500 tabContent.getUndoManager().addEdit(new TranslatePetriNetObjectEdit(pnobject, transX, transY, this));500 for (PetriNetObject pnobject : objects) {
501 }501 tabContent.getUndoManager().addEdit(new TranslatePetriNetObjectEdit(pnobject, transX, transY, this));
502 }
503 }
502 }504 }
503}505}

Subscribers

People subscribed via source and target branches