Fix T54836: Select sharp edges doesn't flush to faces
authorCampbell Barton <ideasman42@gmail.com>
Thu, 26 Apr 2018 12:30:27 +0000 (14:30 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 26 Apr 2018 12:35:55 +0000 (14:35 +0200)
source/blender/editors/mesh/editmesh_select.c

index b45db94318bb544d154a1208f9e66224231457b9..11fb65242f50c9c9bb36c3b1f04aadea28e28f4f 100644 (file)
@@ -3690,6 +3690,13 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
                }
        }
 
+       if ((em->bm->selectmode & (SCE_SELECT_VERTEX | SCE_SELECT_EDGE)) == 0) {
+               /* Since we can't select individual edges, select faces connected to them. */
+               EDBM_selectmode_convert(em, SCE_SELECT_EDGE, SCE_SELECT_FACE);
+       }
+       else {
+               EDBM_selectmode_flush(em);
+       }
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
        return OPERATOR_FINISHED;