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
1=== modified file 'src/pipe/gui/graphicElements/AnnotationNote.java'
2--- src/pipe/gui/graphicElements/AnnotationNote.java 2019-03-13 07:27:29 +0000
3+++ src/pipe/gui/graphicElements/AnnotationNote.java 2019-09-21 07:52:02 +0000
4@@ -167,7 +167,7 @@
5 String newText = note.getText();
6 if (oldText != null && !newText.equals(oldText)) {
7 // Text has been changed
8- CreateGui.getDrawingSurface().getUndoManager().addNewEdit(
9+ CreateGui.getDrawingSurface().getUndoManager().addEdit(
10 new AnnotationTextEdit(this, oldText, newText));
11 updateBounds();
12 }
13
14=== modified file 'src/pipe/gui/undo/AddPetriNetObjectEdit.java'
15--- src/pipe/gui/undo/AddPetriNetObjectEdit.java 2011-09-22 14:51:36 +0000
16+++ src/pipe/gui/undo/AddPetriNetObjectEdit.java 2019-09-21 07:52:02 +0000
17@@ -31,12 +31,14 @@
18 @Override
19 public void undo() {
20 pnObject.delete();
21+ view.repaint();
22 }
23
24 /** */
25 @Override
26 public void redo() {
27 pnObject.undelete(view);
28+ view.repaint();
29 }
30
31 @Override

Subscribers

People subscribed via source and target branches