[#24066] Menu_Items_Greyed
authorCampbell Barton <ideasman42@gmail.com>
Thu, 30 Sep 2010 15:07:22 +0000 (15:07 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 30 Sep 2010 15:07:22 +0000 (15:07 +0000)
revert fix for bug #24009, this made menu items fail poll()

source/blender/editors/screen/screen_ops.c

index 7336d76..7638d57 100644 (file)
@@ -131,9 +131,13 @@ int ED_operator_view3d_active(bContext *C)
 
 int ED_operator_region_view3d_active(bContext *C)
 {
+#if 0 // correct but messes up poll() for menu items.
        if(CTX_wm_region_view3d(C))
                return TRUE;
-       
+#else
+       if(ed_spacetype_test(C, SPACE_VIEW3D))
+               return TRUE;
+#endif
        CTX_wm_operator_poll_msg_set(C, "expected a view3d region");
        return FALSE;   
 }