2.5 Particle edit:
authorNicholas Bishop <nicholasbishop@gmail.com>
Mon, 17 Aug 2009 17:34:15 +0000 (17:34 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Mon, 17 Aug 2009 17:34:15 +0000 (17:34 +0000)
* Fixed cursor poll, so the cursor won't show up outside the 3d view

source/blender/editors/physics/editparticle.c

index 83bf12d651e1c89d78984343779a5ddd07961212..0317a500196a5cb25d7eb61e4fa56ced9d0e9459 100644 (file)
@@ -109,7 +109,8 @@ static int PE_poll(bContext *C)
 
 static int PE_poll_3dview(bContext *C)
 {
-       return PE_poll(C) && CTX_wm_region_view3d(C);
+       return PE_poll(C) && CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
+               CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW;
 }
 
 static void PE_free_particle_edit(ParticleSystem *psys)
@@ -2260,7 +2261,7 @@ static void toggle_particle_cursor(bContext *C, int enable)
                pset->paintcursor = NULL;
        }
        else if(enable)
-               pset->paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), PE_poll, brush_drawcursor, NULL);
+               pset->paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), PE_poll_3dview, brush_drawcursor, NULL);
 }
 
 /********************* radial control operator *********************/