diff options
author | Andreas Abraham <andreas.abraham@iaik.tugraz.at> | 2021-07-12 05:27:16 -0700 |
---|---|---|
committer | Andreas Abraham <andreas.abraham@iaik.tugraz.at> | 2021-07-12 05:27:16 -0700 |
commit | cd70045d1127a5ace49ac03f10cab1cd58f914cf (patch) | |
tree | 42b7651a2a3fceeb6eeaeb63186ca03676ed6610 /pdf-over-gui/src | |
parent | ca350b2f332743f903cf7f82cf57dcf7730e8dd2 (diff) | |
parent | 56614cde906eda5b24bc77dbee298cfa39cbecfb (diff) | |
download | pdf-over-cd70045d1127a5ace49ac03f10cab1cd58f914cf.tar.gz pdf-over-cd70045d1127a5ace49ac03f10cab1cd58f914cf.tar.bz2 pdf-over-cd70045d1127a5ace49ac03f10cab1cd58f914cf.zip |
Merge branch 'master' of gitlab.iaik.tugraz.at:egiz/pdf-over
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 7 |
1 files changed, 6 insertions, 1 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 82a5a7a9..77b8c7c3 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 @@ -326,7 +326,12 @@ public class PositioningComposite extends StateComposite { @Override public void widgetSelected(SelectionEvent e) { System.out.println("selection: " + PositioningComposite.this.scrollbar.getSelection()); - PositioningComposite.this.showPage(PositioningComposite.this.scrollbar.getSelection()); + int selection = PositioningComposite.this.scrollbar.getSelection(); + if (selection < 0) { + selection = 0; + System.out.println("corrected selecttion to: " + selection); + } + PositioningComposite.this.showPage(selection); } }; |