Merge lp:~tapaal-contributor/tapaal/annotation-note-close-1849639 into lp:tapaal

Proposed by Peter Haahr Taankvist
Status: Merged
Approved by: Jiri Srba
Approved revision: 1028
Merged at revision: 1029
Proposed branch: lp:~tapaal-contributor/tapaal/annotation-note-close-1849639
Merge into: lp:tapaal
Diff against target: 26 lines (+9/-0)
1 file modified
src/pipe/gui/graphicElements/AnnotationNote.java (+9/-0)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/annotation-note-close-1849639
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Review via email: mp+375558@code.launchpad.net

Commit message

Closing annotation note panel with X now works as when pressing cancel

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
1=== modified file 'src/pipe/gui/graphicElements/AnnotationNote.java'
2--- src/pipe/gui/graphicElements/AnnotationNote.java 2019-09-21 07:49:26 +0000
3+++ src/pipe/gui/graphicElements/AnnotationNote.java 2019-11-14 15:52:56 +0000
4@@ -8,6 +8,8 @@
5 import java.awt.Rectangle;
6 import java.awt.RenderingHints;
7 import java.awt.event.MouseEvent;
8+import java.awt.event.WindowAdapter;
9+import java.awt.event.WindowEvent;
10 import java.awt.geom.AffineTransform;
11
12 import javax.swing.JDialog;
13@@ -154,6 +156,13 @@
14 guiDialog.add(new AnnotationPanel(this));
15 guiDialog.setMinimumSize(new Dimension(300, 200));
16 // Make window fit contents' preferred size
17+ guiDialog.addWindowListener(new WindowAdapter() {
18+ public void windowClosing(WindowEvent e) {
19+ if(isNew()) {
20+ delete();
21+ }
22+ }
23+ });
24 guiDialog.pack();
25
26 // Move window to the middle of the screen

Subscribers

People subscribed via source and target branches