diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 3 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index 9c649f1c..8f90cd78 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -423,7 +423,8 @@ public class PositioningComposite extends StateComposite { */ public void setPosition(float x, float y, int page) { showPage(page); - this.viewer.setSignaturePosition(x, y); + if (this.viewer != null) + this.viewer.setSignaturePosition(x, y); } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index b4933cb2..264ccd2f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java @@ -335,9 +335,10 @@ public class SignaturePanel extends JPanel { } else { if ( - (this.sigScreenWidth != this.prevSigScreenWidth) || + ((this.sigScreenWidth != this.prevSigScreenWidth) || (this.sigScreenHeight != this.prevSigScreenHeight) || - (this.sigPlaceholderTransparency != this.prevSigPlaceholderTransparency)) + (this.sigPlaceholderTransparency != this.prevSigPlaceholderTransparency)) && + ((this.sigScreenWidth != 0) && (this.sigScreenHeight != 0))) { // redraw scaled transparent placeholder this.prevSigScreenWidth = this.sigScreenWidth; |