Skip to content

Commit

Permalink
Merge pull request #1268 from peppy/scrollcontainer-assert
Browse files Browse the repository at this point in the history
Switch Trace.Assert to Debug.Assert to avoid user-facing errors
  • Loading branch information
smoogipoo committed Dec 17, 2017
2 parents 2fa4a1f + a5375d7 commit a6a3198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osu.Framework/Graphics/Containers/ScrollContainer.cs
Expand Up @@ -287,7 +287,7 @@ protected override bool OnDrag(InputState state)
float scrollOffset = -childDelta[ScrollDim];
float clampedScrollOffset = Clamp(target + scrollOffset) - Clamp(target);

Trace.Assert(Precision.AlmostBigger(Math.Abs(scrollOffset), clampedScrollOffset * Math.Sign(scrollOffset)));
Debug.Assert(Precision.AlmostBigger(Math.Abs(scrollOffset), clampedScrollOffset * Math.Sign(scrollOffset)));

// If we are dragging past the extent of the scrollable area, half the offset
// such that the user can feel it.
Expand Down

0 comments on commit a6a3198

Please sign in to comment.