//
AIS_MouseGesture_Zoom, //!< view zoom gesture;
//! move mouse left to zoom-out, and to the right to zoom-in
+ AIS_MouseGesture_ZoomVertical, //!< view zoom gesture;
+ //! move mouse up to zoom-out, and to the down to zoom-in
AIS_MouseGesture_ZoomWindow, //!< view zoom by window gesture;
//! press button to start, move mouse to define rectangle, release to finish
AIS_MouseGesture_Pan, //!< view panning gesture
}
case AIS_MouseGesture_Zoom:
case AIS_MouseGesture_ZoomWindow:
+ case AIS_MouseGesture_ZoomVertical:
{
if (!myToAllowZooming)
{
break;
}
case AIS_MouseGesture_Zoom:
+ case AIS_MouseGesture_ZoomVertical:
{
if (!myToAllowZooming)
{
const double aZoomTol = theIsEmulated
? double(myTouchToleranceScale) * myTouchZoomThresholdPx
: 0.0;
- if (double (Abs (aDelta.x())) > aZoomTol)
+ const double aScrollDelta = myMouseActiveGesture == AIS_MouseGesture_Zoom
+ ? aDelta.x()
+ : aDelta.y();
+ if (Abs (aScrollDelta) > aZoomTol)
{
- UpdateZoom (Aspect_ScrollDelta (aDelta.x()));
+ if (UpdateZoom (Aspect_ScrollDelta (aScrollDelta)))
+ {
+ toUpdateView = true;
+ }
myUI.Dragging.ToMove = true;
myUI.Dragging.PointTo = thePoint;
myMouseProgressPoint = thePoint;
- toUpdateView = true;
}
break;
}