| @@ -775,7 +775,9 @@ public: | |||||
| newPos = 1.0 - newPos; | newPos = 1.0 - newPos; | ||||
| } | } | ||||
| valueWhenLastDragged = owner.proportionOfLengthToValue (jlimit (0.0, 1.0, newPos)); | |||||
| newPos = (isRotary() && ! rotaryParams.stopAtEnd) ? newPos - std::floor (newPos) | |||||
| : jlimit (0.0, 1.0, newPos); | |||||
| valueWhenLastDragged = owner.proportionOfLengthToValue (newPos); | |||||
| } | } | ||||
| void handleVelocityDrag (const MouseEvent& e) | void handleVelocityDrag (const MouseEvent& e) | ||||
| @@ -806,8 +808,10 @@ public: | |||||
| || (style == IncDecButtons && ! incDecDragDirectionIsHorizontal())) | || (style == IncDecButtons && ! incDecDragDirectionIsHorizontal())) | ||||
| speed = -speed; | speed = -speed; | ||||
| auto currentPos = owner.valueToProportionOfLength (valueWhenLastDragged); | |||||
| valueWhenLastDragged = owner.proportionOfLengthToValue (jlimit (0.0, 1.0, currentPos + speed)); | |||||
| auto newPos = owner.valueToProportionOfLength (valueWhenLastDragged) + speed; | |||||
| newPos = (isRotary() && ! rotaryParams.stopAtEnd) ? newPos - std::floor (newPos) | |||||
| : jlimit (0.0, 1.0, newPos); | |||||
| valueWhenLastDragged = owner.proportionOfLengthToValue (newPos); | |||||
| e.source.enableUnboundedMouseMovement (true, false); | e.source.enableUnboundedMouseMovement (true, false); | ||||
| } | } | ||||
| @@ -1051,7 +1055,10 @@ public: | |||||
| auto proportionDelta = wheelAmount * 0.15; | auto proportionDelta = wheelAmount * 0.15; | ||||
| auto currentPos = owner.valueToProportionOfLength (value); | auto currentPos = owner.valueToProportionOfLength (value); | ||||
| return owner.proportionOfLengthToValue (jlimit (0.0, 1.0, currentPos + proportionDelta)) - value; | |||||
| auto newPos = currentPos + proportionDelta; | |||||
| newPos = (isRotary() && ! rotaryParams.stopAtEnd) ? newPos - std::floor (newPos) | |||||
| : jlimit (0.0, 1.0, newPos); | |||||
| return owner.proportionOfLengthToValue (newPos) - value; | |||||
| } | } | ||||
| bool mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) | bool mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) | ||||