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:32:35 +0000 (14:32 +0200)
source/blender/editors/mesh/editmesh_select.c

index 181fc4c0c52b9a2383ea28a95830c67c914da498..019aa6d42015a0d7bd8bac3328e63e67a73f4e53 100644 (file)
@@ -3533,6 +3533,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;