summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-06-03 12:35:37 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-06-03 12:35:37 +0200
commitcf63d668bf0cd9656c0ecd8a7e4765547027e4da (patch)
tree5adf123de0ee84fb2c642a09188ac17615a6599b /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites
parentc6c9ed1d1eee00976667cec5e86aae742308240c (diff)
downloadpdf-over-cf63d668bf0cd9656c0ecd8a7e4765547027e4da.tar.gz
pdf-over-cf63d668bf0cd9656c0ecd8a7e4765547027e4da.tar.bz2
pdf-over-cf63d668bf0cd9656c0ecd8a7e4765547027e4da.zip
quick cleanup/refactoring
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.java10
1 files changed, 4 insertions, 6 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 40199301..8ca9d3ef 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
@@ -145,11 +145,11 @@ public class PositioningComposite extends StateComposite {
public void run() {
PositioningComposite.this.frame = SWT_AWT.new_Frame(PositioningComposite.this.mainArea);
PositioningComposite.this.frame.addKeyListener(PositioningComposite.this.keyListener);
+ // Workaround for Windows: Scrollbar always gets the event
+ if (!System.getProperty("os.name").toLowerCase().contains("windows")) //$NON-NLS-1$ //$NON-NLS-2$
+ PositioningComposite.this.frame.addMouseWheelListener(PositioningComposite.this.mouseListener);
}
});
- // Workaround for Windows: Scrollbar always gets the event
- if (!System.getProperty("os.name").toLowerCase().contains("windows")) //$NON-NLS-1$ //$NON-NLS-2$
- PositioningComposite.this.frame.addMouseWheelListener(PositioningComposite.this.mouseListener);
}
});
@@ -320,10 +320,8 @@ public class PositioningComposite extends StateComposite {
int newPage = PositioningComposite.this.currentPage;
if (e.getWheelRotation() < 0) {
- if (PositioningComposite.this.currentPage > 1) {
- System.out.println("################## page " + newPage);
+ if (PositioningComposite.this.currentPage > 1)
newPage--;
- }
} else if (e.getWheelRotation() > 0) {
if (PositioningComposite.this.currentPage < PositioningComposite.this.numPages)
newPage++;