git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5509493
)
JAL-2464 fix cancel tree print behaviour
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 23 Mar 2017 15:10:52 +0000
(15:10 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 23 Mar 2017 15:10:52 +0000
(15:10 +0000)
src/jalview/gui/TreeCanvas.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/TreeCanvas.java
b/src/jalview/gui/TreeCanvas.java
index
54eed1a
..
9a38d4c
100755
(executable)
--- a/
src/jalview/gui/TreeCanvas.java
+++ b/
src/jalview/gui/TreeCanvas.java
@@
-549,7
+549,16
@@
public class TreeCanvas extends JPanel implements MouseListener, Runnable,
public void run()
{
PrinterJob printJob = PrinterJob.getPrinterJob();
- PageFormat pf = printJob.pageDialog(printJob.defaultPage());
+ PageFormat defaultPage = printJob.defaultPage();
+ PageFormat pf = printJob.pageDialog(defaultPage);
+
+ if (defaultPage == pf)
+ {
+ /*
+ * user cancelled
+ */
+ return;
+ }
printJob.setPrintable(this, pf);