diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-29 21:49:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-29 21:55:37 +0400 |
commit | d71db08f6d31521925ae5ee5ebd5bb542d906d78 (patch) | |
tree | d9fe70a536e502df2e95a82821c68e12dea5877a | |
parent | 4be837f1924337fe4ca974577ca0282ff6d6eb33 (diff) |
Fix 39065: Leaving QuadView lost view settings
Now the 'User' view is used when exiting quadview.
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 49a3d84813c..6506eb3b58e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2889,6 +2889,20 @@ static int region_quadview_exec(bContext *C, wmOperator *op) if (sa->spacetype == SPACE_VIEW3D) { ARegion *ar_iter; RegionView3D *rv3d = ar->regiondata; + + /* if this is a locked view, use settings from 'User' view */ + if (rv3d->viewlock) { + View3D *v3d_user; + ARegion *ar_user; + + if (ED_view3d_context_user_region(C, &v3d_user, &ar_user)) { + if (ar != ar_user) { + SWAP(void *, ar->regiondata, ar_user->regiondata); + rv3d = ar->regiondata; + } + } + } + rv3d->viewlock_quad = RV3D_VIEWLOCK_INIT; rv3d->viewlock = 0; rv3d->rflag &= ~RV3D_CLIPPING; |