summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java10
1 files changed, 8 insertions, 2 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 b7ed647d..defa846a 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
@@ -237,16 +237,22 @@ public class PositioningComposite extends StateComposite {
};
private MouseWheelListener mouseListener = new MouseWheelListener() {
+ private long lastEventTime = 0;
+
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
+ if (e.getWhen() == this.lastEventTime)
+ return;
+ this.lastEventTime = e.getWhen();
+
int newPage = PositioningComposite.this.currentPage;
- if (e.getUnitsToScroll() < 0)
+ if (e.getWheelRotation() < 0)
{
if (PositioningComposite.this.currentPage > 1)
newPage--;
}
- else if (e.getUnitsToScroll() > 0)
+ else if (e.getWheelRotation() > 0)
{
if (PositioningComposite.this.currentPage < PositioningComposite.this.numPages)
newPage++;