Skip to content

Commit

Permalink
use ctrl+shift to move camera like pageUp/pageDown
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and wonder-sk committed Jan 31, 2023
1 parent f9e2160 commit c681608
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/3d/qgscameracontroller.cpp
Expand Up @@ -460,6 +460,15 @@ void QgsCameraController::onPositionChangedTerrainNavigation( Qt3DInput::QMouseE
mCameraPose.setCenterPoint( mCameraBeforeDrag->viewCenter() + shiftVector );
updateCameraFromPose();
}
else if ( hasLeftButton && hasShift && hasCtrl )
{
// change the camera elevation, similar to pageUp/pageDown
QgsVector3D center = mCameraPose.centerPoint();
double tElev = mMousePos.y() - mouse->y();
center.set( center.x(), center.y() + tElev * 0.5, center.z() );
mCameraPose.setCenterPoint( center );
updateCameraFromPose();
}
else if ( hasRightButton && !hasShift && !hasCtrl )
{
if ( !mDepthBufferIsReady )
Expand Down

0 comments on commit c681608

Please sign in to comment.