Fix T47271: Vertex Group to Selected missing update
authorCampbell Barton <ideasman42@gmail.com>
Fri, 29 Jan 2016 04:05:14 +0000 (15:05 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 29 Jan 2016 04:12:57 +0000 (15:12 +1100)
source/blender/editors/object/object_vgroup.c

index 265ef222d56029b4cb1306a43e959fe27b23e144..da1173f363aa2897bca646afedb634ab5abdf8ae 100644 (file)
@@ -3327,8 +3327,14 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
        CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
        {
                if (obact != ob) {
-                       if (ED_vgroup_array_copy(ob, obact)) changed_tot++;
-                       else fail++;
+                       if (ED_vgroup_array_copy(ob, obact)) {
+                               DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                               WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob);
+                               changed_tot++;
+                       }
+                       else {
+                               fail++;
+                       }
                }
        }
        CTX_DATA_END;