Fix T52490: NDOF orbit doesn't lock in ortho view
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Aug 2017 14:47:47 +0000 (00:47 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Aug 2017 14:51:25 +0000 (00:51 +1000)
Regression in af3f7db caused by own fix for T51324

source/blender/editors/space_view3d/view3d_edit.c

index b524119019b99064483ad56bd4fdcf6e8c24d83d..863024514cc01c5fb4cabcdb66b4415c9498739f 100644 (file)
@@ -750,7 +750,8 @@ static void viewops_data_create_ex(
                vod->use_dyn_ofs = false;
        }
 
-       if (switch_from_camera) {
+       /* Check we're in the camera view, otherwise we may switch out of axis views, see: T52490 */
+       if (switch_from_camera && (rv3d->persp == RV3D_CAMOB)) {
                /* switch from camera view when: */
                if (view3d_ensure_persp(vod->v3d, vod->ar)) {
                        /* If we're switching from camera view to the perspective one,