fix [#26793] Is the Convert function of Grease Pencil normal?

disallow grease pencil conversion in editmode, was setting a new active object.
This commit is contained in:
Campbell Barton 2011-04-05 08:54:13 +00:00
parent 61933ec4b9
commit 1f45f5c15d

@ -549,9 +549,10 @@ static int gp_convert_poll (bContext *C)
{
bGPdata *gpd= gpencil_data_get_active(C);
ScrArea *sa= CTX_wm_area(C);
Scene *scene= CTX_data_scene(C);
/* only if there's valid data, and the current view is 3D View */
return ((sa && sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd));
return ((sa && sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd) && (scene->obedit == NULL));
}
static int gp_convert_layer_exec (bContext *C, wmOperator *op)