Gui: Update rotation center indicator after zoom

This commit is contained in:
Rexbas
2023-11-24 22:43:48 +01:00
parent ac4a878052
commit 72c69ce2f0
3 changed files with 22 additions and 0 deletions

View File

@@ -739,6 +739,12 @@ void NavigationStyle::doZoom(SoCamera* camera, float logfactor, const SbVec2f& p
SbViewVolume vv = camera->getViewVolume(vp.getViewportAspectRatio());
SbPlane panplane = vv.getPlane(camera->focalDistance.getValue());
panCamera(viewer->getSoRenderManager()->getCamera(), ratio, panplane, pos, SbVec2f(0.5,0.5));
// Change the position of the rotation center indicator after zooming at cursor
// Rotation mode is WindowCenter
if (!rotationCenterMode) {
viewer->changeRotationCenterPosition(getFocalPoint());
}
}
}