Commit: db3dfb76a8c51a7c65ec6da715c9df91b75b68d1
Author: Bastien Montagne
Date:   Fri Oct 9 22:24:58 2015 +0200
Branches: master
https://developer.blender.org/rBdb3dfb76a8c51a7c65ec6da715c9df91b75b68d1

Fix T46426: 2D-version of zoom border operator is available in 3DView context.

===================================================================

M       source/blender/editors/interface/view2d_ops.c

===================================================================

diff --git a/source/blender/editors/interface/view2d_ops.c 
b/source/blender/editors/interface/view2d_ops.c
index 07275d6..ca1efb8 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) */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to