mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0033513: Zooming - Only working when mouse move horizontally
This commit is contained in:
parent
6aa053ae00
commit
f60082f9fb
@ -29,6 +29,7 @@ enum AIS_MouseGesture
|
|||||||
//
|
//
|
||||||
AIS_MouseGesture_Zoom, //!< view zoom gesture;
|
AIS_MouseGesture_Zoom, //!< view zoom gesture;
|
||||||
//! move mouse left to zoom-out, and to the right to zoom-in
|
//! move mouse left to zoom-out, and to the right to zoom-in
|
||||||
|
AIS_MouseGesture_ZoomVertical, //!< view zoom vertical;
|
||||||
AIS_MouseGesture_ZoomWindow, //!< view zoom by window gesture;
|
AIS_MouseGesture_ZoomWindow, //!< view zoom by window gesture;
|
||||||
//! press button to start, move mouse to define rectangle, release to finish
|
//! press button to start, move mouse to define rectangle, release to finish
|
||||||
AIS_MouseGesture_Pan, //!< view panning gesture
|
AIS_MouseGesture_Pan, //!< view panning gesture
|
||||||
|
@ -838,6 +838,7 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
|
|||||||
}
|
}
|
||||||
case AIS_MouseGesture_Zoom:
|
case AIS_MouseGesture_Zoom:
|
||||||
case AIS_MouseGesture_ZoomWindow:
|
case AIS_MouseGesture_ZoomWindow:
|
||||||
|
case AIS_MouseGesture_ZoomVertical:
|
||||||
{
|
{
|
||||||
if (!myToAllowZooming)
|
if (!myToAllowZooming)
|
||||||
{
|
{
|
||||||
@ -1055,6 +1056,25 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case AIS_MouseGesture_ZoomVertical:
|
||||||
|
{
|
||||||
|
if (!myToAllowZooming)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const double aZoomTol = theIsEmulated
|
||||||
|
? double(myTouchToleranceScale) * myTouchZoomThresholdPx
|
||||||
|
: 0.0;
|
||||||
|
if (double (Abs (aDelta.y())) > aZoomTol)
|
||||||
|
{
|
||||||
|
if (UpdateZoom (Aspect_ScrollDelta (aDelta.y())))
|
||||||
|
{
|
||||||
|
toUpdateView = true;
|
||||||
|
}
|
||||||
|
myMouseProgressPoint = thePoint;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case AIS_MouseGesture_Pan:
|
case AIS_MouseGesture_Pan:
|
||||||
{
|
{
|
||||||
if (!myToAllowPanning)
|
if (!myToAllowPanning)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user