Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-10-09 23:24:58 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-10-09 23:24:58 +0300
commitdb3dfb76a8c51a7c65ec6da715c9df91b75b68d1 (patch)
tree9f6ab7a32c2ad690e06d9e940d35b287b7c81c0a /source/blender/editors
parent165c87dc4ff66f3bed58ffa129bb4ca2e965a40f (diff)
Fix T46426: 2D-version of zoom border operator is available in 3DView context.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/view2d_ops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 07275d6be2a..ca1efb82ae9 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -612,15 +612,20 @@ static int view_zoom_poll(bContext *C)
/* check if there's a region in context to work with */
if (ar == NULL)
- return 0;
+ return false;
+
+ /* Do not show that in 3DView context. */
+ if (CTX_wm_region_view3d(C))
+ return false;
+
v2d = &ar->v2d;
/* check that 2d-view is zoomable */
if ((v2d->keepzoom & V2D_LOCKZOOM_X) && (v2d->keepzoom & V2D_LOCKZOOM_Y))
- return 0;
+ return false;
/* view is zoomable */
- return 1;
+ return true;
}
/* apply transform to view (i.e. adjust 'cur' rect) */