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:
77b160b
)
JAL-2959 no Print dialog shown if Page Format is Cancelled
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 24 Apr 2018 14:27:36 +0000
(15:27 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 24 Apr 2018 14:27:36 +0000
(15:27 +0100)
src/jalview/gui/PCAPanel.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/PCAPanel.java
b/src/jalview/gui/PCAPanel.java
index
9f52d26
..
7ceceee
100644
(file)
--- a/
src/jalview/gui/PCAPanel.java
+++ b/
src/jalview/gui/PCAPanel.java
@@
-464,7
+464,16
@@
public class PCAPanel extends GPCAPanel
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);