Bevel: flush selection with non-modal execution

This commit is contained in:
Campbell Barton 2020-01-21 01:27:46 +11:00
parent 5c5f2bd221
commit 133f6a9812
Notes: blender-bot 2023-02-13 23:30:46 +01:00
Referenced by issue #73771, New Bevel: Scaling Vertices, Edges by their individual origins has different behavior if bevel regions are direct neighbors (selection flushing to edges immediately?)
1 changed files with 9 additions and 6 deletions

View File

@ -421,17 +421,20 @@ static void edbm_bevel_exit(bContext *C, wmOperator *op)
ED_area_status_text(sa, NULL);
}
for (uint ob_index = 0; ob_index < opdata->ob_store_len; ob_index++) {
Object *obedit = opdata->ob_store[ob_index].ob;
BMEditMesh *em = BKE_editmesh_from_object(obedit);
/* Without this, faces surrounded by selected edges/verts will be unselected. */
if ((em->selectmode & SCE_SELECT_FACE) == 0) {
EDBM_selectmode_flush(em);
}
}
if (opdata->is_modal) {
View3D *v3d = CTX_wm_view3d(C);
ARegion *ar = CTX_wm_region(C);
for (uint ob_index = 0; ob_index < opdata->ob_store_len; ob_index++) {
Object *obedit = opdata->ob_store[ob_index].ob;
BMEditMesh *em = BKE_editmesh_from_object(obedit);
EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup, NULL, false);
/* Without this, faces surrounded by selected edges/verts will be unselected. */
if ((em->selectmode & SCE_SELECT_FACE) == 0) {
EDBM_selectmode_flush(em);
}
}
ED_region_draw_cb_exit(ar->type, opdata->draw_handle_pixel);
if (v3d) {