public void mouseWheelMoved(MouseWheelEvent e)
{
e.consume();
- double wheelRotation = e.getPreciseWheelRotation();
+ double preciseWheelRotation = e.getPreciseWheelRotation();
+ int wheelRotation = e.getWheelRotation();
+ if (wheelRotation == 0 && Math.abs(preciseWheelRotation) > 0.1)
+ {
+ wheelRotation = 1;
+ }
/*
* scroll more for large (fast) mouse movements
*/
- int size = 1 + (int) Math.abs(wheelRotation);
+ int size = Math.abs(wheelRotation);
if (wheelRotation > 0)
{
*/
if (!ap.isScrolledFullyRight())
{
- av.getRanges().scrollRight(true, size - 1);
+ av.getRanges().scrollRight(true, size);
}
}
else
/*
* scroll left
*/
- av.getRanges().scrollRight(false, size - 1);
+ av.getRanges().scrollRight(false, size);
}
else
{