resolve glitch in the image space where mask editing and UVs would conflict.
[blender.git] / source / blender / editors / space_image / image_edit.c
index 81423560fb5761c6010f63c75e9fc35fd3c29ef3..899685d0dc2e6c8f00b1a71a4cd060a161efdc7f 100644 (file)
@@ -352,8 +352,14 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit)
 }
 
 /* matches clip function */
-int ED_space_image_check_show_maskedit(SpaceImage *sima)
+int ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima)
 {
+       /* check editmode - this is reserved for UV editing */
+       Object *ob = OBACT;
+       if (ob && ob->mode & OB_MODE_EDIT) {
+               return FALSE;
+       }
+
        return (sima->mode == SI_MODE_MASK);
 }
 
@@ -362,7 +368,8 @@ int ED_space_image_maskedit_poll(bContext *C)
        SpaceImage *sima = CTX_wm_space_image(C);
 
        if (sima && sima->image) {
-               return ED_space_image_check_show_maskedit(sima);
+               Scene *scene = CTX_data_scene(C);
+               return ED_space_image_check_show_maskedit(scene, sima);
        }
 
        return FALSE;