Merge lp:~tapaal-contributor/tapaal/undo-annotation-note-1834460 into lp:tapaal

Proposed by Peter Haahr Taankvist
Status: Merged
Approved by: Jiri Srba
Approved revision: 1015
Merged at revision: 1015
Proposed branch: lp:~tapaal-contributor/tapaal/undo-annotation-note-1834460
Merge into: lp:tapaal
Diff against target: 31 lines (+3/-1)
2 files modified
src/pipe/gui/graphicElements/AnnotationNote.java (+1/-1)
src/pipe/gui/undo/AddPetriNetObjectEdit.java (+2/-0)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/undo-annotation-note-1834460
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Review via email: mp+373049@code.launchpad.net

Commit message

Undo annotation note now works on first ctrl+z

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

Fixes the problem.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/pipe/gui/graphicElements/AnnotationNote.java'
--- src/pipe/gui/graphicElements/AnnotationNote.java 2019-03-13 07:27:29 +0000
+++ src/pipe/gui/graphicElements/AnnotationNote.java 2019-09-21 07:52:02 +0000
@@ -167,7 +167,7 @@
167 String newText = note.getText();167 String newText = note.getText();
168 if (oldText != null && !newText.equals(oldText)) {168 if (oldText != null && !newText.equals(oldText)) {
169 // Text has been changed169 // Text has been changed
170 CreateGui.getDrawingSurface().getUndoManager().addNewEdit(170 CreateGui.getDrawingSurface().getUndoManager().addEdit(
171 new AnnotationTextEdit(this, oldText, newText));171 new AnnotationTextEdit(this, oldText, newText));
172 updateBounds();172 updateBounds();
173 }173 }
174174
=== modified file 'src/pipe/gui/undo/AddPetriNetObjectEdit.java'
--- src/pipe/gui/undo/AddPetriNetObjectEdit.java 2011-09-22 14:51:36 +0000
+++ src/pipe/gui/undo/AddPetriNetObjectEdit.java 2019-09-21 07:52:02 +0000
@@ -31,12 +31,14 @@
31 @Override31 @Override
32 public void undo() {32 public void undo() {
33 pnObject.delete();33 pnObject.delete();
34 view.repaint();
34 }35 }
3536
36 /** */37 /** */
37 @Override38 @Override
38 public void redo() {39 public void redo() {
39 pnObject.undelete(view);40 pnObject.undelete(view);
41 view.repaint();
40 }42 }
4143
42 @Override44 @Override

Subscribers

People subscribed via source and target branches