diff options
Diffstat (limited to 'source/blender/src/editmesh.c')
-rw-r--r-- | source/blender/src/editmesh.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 9eef61e11f9..188f7476728 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -340,8 +340,9 @@ void free_editface(EditFace *efa) #endif EM_remove_selection(efa, EDITFACE); - if (G.editMesh->act_face==efa) - EM_set_actFace(NULL); + if (G.editMesh->act_face==efa) { + EM_set_actFace( G.editMesh->faces.first == efa ? NULL : G.editMesh->faces.first); + } CustomData_em_free_block(&G.editMesh->fdata, &efa->data); if(efa->fast==0) @@ -1059,7 +1060,11 @@ void make_editMesh() EM_hide_reset(); /* sets helper flags which arent saved */ EM_fgon_flags(); - + + if (EM_get_actFace(0)==NULL) { + EM_set_actFace( G.editMesh->faces.first ); /* will use the first face, this is so we alwats have an active face */ + } + /* vertex coordinates change with cache edit, need to recalc */ if(cacheedit) recalc_editnormals(); |