diff --git a/src/main/java/com/sparrowwallet/sparrow/control/FeeRangeSlider.java b/src/main/java/com/sparrowwallet/sparrow/control/FeeRangeSlider.java index 4e4543e4..335d9904 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/FeeRangeSlider.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/FeeRangeSlider.java @@ -49,13 +49,15 @@ public class FeeRangeSlider extends Slider { }); setOnScroll(event -> { - double newFeeRate = getFeeRate() + (event.getDeltaY() > 0 ? FEE_RATE_SCROLL_INCREMENT : -FEE_RATE_SCROLL_INCREMENT); - if(newFeeRate < LONG_FEE_RATES_RANGE.get(0)) { - newFeeRate = LONG_FEE_RATES_RANGE.get(0); - } else if(newFeeRate > LONG_FEE_RATES_RANGE.get(LONG_FEE_RATES_RANGE.size() - 1)) { - newFeeRate = LONG_FEE_RATES_RANGE.get(LONG_FEE_RATES_RANGE.size() - 1); + if(event.getDeltaY() != 0) { + double newFeeRate = getFeeRate() + (event.getDeltaY() > 0 ? FEE_RATE_SCROLL_INCREMENT : -FEE_RATE_SCROLL_INCREMENT); + if(newFeeRate < LONG_FEE_RATES_RANGE.get(0)) { + newFeeRate = LONG_FEE_RATES_RANGE.get(0); + } else if(newFeeRate > LONG_FEE_RATES_RANGE.get(LONG_FEE_RATES_RANGE.size() - 1)) { + newFeeRate = LONG_FEE_RATES_RANGE.get(LONG_FEE_RATES_RANGE.size() - 1); + } + setFeeRate(newFeeRate); } - setFeeRate(newFeeRate); }); } diff --git a/src/main/java/com/sparrowwallet/sparrow/control/QRDisplayDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/QRDisplayDialog.java index 42df0c63..c2293d74 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/QRDisplayDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/QRDisplayDialog.java @@ -101,7 +101,7 @@ public class QRDisplayDialog extends Dialog { stackPane.getChildren().add(qrImageView); qrImageView.setOnScroll(scrollEvent -> { - if(animateQRService != null && animateQRService.isRunning()) { + if(animateQRService != null && animateQRService.isRunning() && scrollEvent.getDeltaY() != 0) { Duration duration = animateQRService.getPeriod(); Duration newDuration = scrollEvent.getDeltaY() > 0 ? duration.multiply(1.1) : duration.multiply(0.9); if(newDuration.lessThan(Duration.millis(ANIMATION_PERIOD_MILLIS*10)) && newDuration.greaterThan(Duration.millis(ANIMATION_PERIOD_MILLIS/2))) {