mirror of https://github.com/ppy/osu
Fix first scroll wheel in editor incorrectly advancing twice
This commit is contained in:
parent
d3245dda1c
commit
bee01bdd38
|
@ -284,7 +284,7 @@ protected override bool OnScroll(ScrollEvent e)
|
|||
// this is a special case to handle the "pivot" scenario.
|
||||
// if we are precise scrolling in one direction then change our mind and scroll backwards,
|
||||
// the existing accumulation should be applied in the inverse direction to maintain responsiveness.
|
||||
if (Math.Sign(scrollAccumulation) != scrollDirection)
|
||||
if (scrollAccumulation != 0 && Math.Sign(scrollAccumulation) != scrollDirection)
|
||||
scrollAccumulation = scrollDirection * (precision - Math.Abs(scrollAccumulation));
|
||||
|
||||
scrollAccumulation += scrollComponent * (e.IsPrecise ? 0.1 : 1);
|
||||
|
|
Loading…
Reference in New Issue