Bugfix #17802: Grease Pencil still draws when not shown in Image Editor

Added missing check for this case.
This commit is contained in:
2008-10-10 22:49:17 +00:00
parent 2f9e0ec154
commit c3aef29ab7

View File

@@ -1754,6 +1754,14 @@ static void gp_session_initpaint (tGPsdata *p)
p->sa= curarea;
p->v2d= &sima->v2d;
p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
/* check that gpencil data is allowed to be drawn */
if ((sima->flag & SI_DISPGP)==0) {
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown \n");
return;
}
}
break;
/* unsupported views */