mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0031102: Visualization, AIS_ViewController - AIS_DragAction_Stop is never emitted on mouse unclick
AIS_ViewController::UpdateMousePosition() now sets myMouseStopDragOnUnclick flag to emit AIS_DragAction_Stop on mouse unclick.
This commit is contained in:
@@ -69,6 +69,7 @@ AIS_ViewController::AIS_ViewController()
|
||||
myMousePressed (Aspect_VKeyMouse_NONE),
|
||||
myMouseModifiers (Aspect_VKeyFlags_NONE),
|
||||
myMouseSingleButton (-1),
|
||||
myMouseStopDragOnUnclick (false),
|
||||
//
|
||||
myTouchToleranceScale (1.0f),
|
||||
myTouchRotationThresholdPx (6.0f),
|
||||
@@ -611,6 +612,7 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
|
||||
{
|
||||
myMouseClickTimer.Stop();
|
||||
myMouseClickCounter = 0;
|
||||
myMouseStopDragOnUnclick = false;
|
||||
myUI.Dragging.ToStop = true;
|
||||
toUpdateView = true;
|
||||
}
|
||||
@@ -619,6 +621,12 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
|
||||
else if (theButtons == Aspect_VKeyMouse_NONE)
|
||||
{
|
||||
myMouseSingleButton = -1;
|
||||
if (myMouseStopDragOnUnclick)
|
||||
{
|
||||
myMouseStopDragOnUnclick = false;
|
||||
myUI.Dragging.ToStop = true;
|
||||
toUpdateView = true;
|
||||
}
|
||||
}
|
||||
else if (myMouseSingleButton == -1)
|
||||
{
|
||||
@@ -769,6 +777,7 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint,
|
||||
myMouseClickTimer.Stop();
|
||||
myMouseClickCounter = 0;
|
||||
myMouseSingleButton = -1;
|
||||
myMouseStopDragOnUnclick = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user