1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 05:19:55 +08:00

Merge pull request #10017 from peppy/fix-first-editor-scroll-wheel

Fix first scroll wheel in editor incorrectly advancing twice
This commit is contained in:
Dan Balasescu
2020-08-31 18:32:34 +09:00
committed by GitHub
Unverified
+1 -1
View File
@@ -284,7 +284,7 @@ namespace osu.Game.Screens.Edit
// 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);