Issue when AIS_ViewCube set to Top and AIS_ViewController bind MouseGesture with AIS_MouseGesture_RotateView

The steps about the issue are as follows:
First, In class AIS_ViewController add MouseGesture AIS_MouseGesture_RotateView to myMouseGestureMap in its constructor function.
Second, Create as AIS_ViewCube object in OCC_3dView
Third, draw a box and click the top of the AIS_ViewCube object.
The last, when begin to rotate view, the view will auto rotate with angle PI/2.

sample code :
void OCC_3dView::ShowViewCube()
Handle(AIS_ViewCube) aisViewCube = new AIS_ViewCube();
Handle(AIS_InteractiveContext) aisContext = GetAISContext();

aisContext->SetDisplayMode(AIS_Shaded, true);
aisViewCube->SetBoxSideLabel(V3d_Xpos, L"右");
aisViewCube->SetBoxSideLabel(V3d_Ypos, L"后");
aisViewCube->SetBoxSideLabel(V3d_Zpos, L"上");
aisViewCube->SetBoxSideLabel(V3d_Xneg, L"左");
aisViewCube->SetBoxSideLabel(V3d_Yneg, L"前");
aisViewCube->SetBoxSideLabel(V3d_Zneg, L"下");
Quantity_Color viewCubeTextColor;
viewCubeTextColor.SetValues(0 / 255., 0 / 255., 0 / 255., Quantity_TOC_RGB);
aisViewCube->SetFont(L"Microsoft YaHei");
aisViewCube->SetSize(60, false);
Quantity_Color viewCubeColor;
viewCubeColor.SetValues(183 / 255., 194 / 255., 213 / 255., Quantity_TOC_RGB);
aisContext->Display(aisViewCube, Standard_True);

myMouseGestureMap.Bind((Standard_UInteger)Aspect_VKeyMouse_RightButton | (Standard_UInteger)Aspect_VKeyFlags_SHIFT,

With My Best Regard.

Dmitrii Pasukhin's picture

Hello, please share OCCT version that are you using. Probably better to create a bug in our bugracker: My View - MantisBT (

You need to log out from anonimus and login back with your profile. Then you can create an issue.

Best regards, Dmitrii.

xin1627's picture

Sorry, I fail to create bug on the bugracker page because I can not get the reset password email.
I log in with github account.

xin1627's picture

Hello Dmitrii Pasukhin
I both test in version 7.6 and version 7.8.