Revision: 17164
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17164
Author:   campbellbarton
Date:     2008-10-22 06:42:00 +0200 (Wed, 22 Oct 2008)

Log Message:
-----------
missing undo for vgroup operations, countall was running twice from 
select/deselect and DAG_object_flush_update isnt needed for changed selections.

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_editing.c

Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c  2008-10-22 03:10:00 UTC 
(rev 17163)
+++ trunk/blender/source/blender/src/buttons_editing.c  2008-10-22 04:42:00 UTC 
(rev 17164)
@@ -4760,7 +4760,7 @@
                        DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        scrarea_queue_winredraw(curarea);
                        allqueue(REDRAWOOPS, 0);
-                       
+                       BIF_undo_push("New vertex group");
                        break;
                case B_DELVGROUP:
                        if ((G.obedit) && (G.obedit == ob)) {
@@ -4776,35 +4776,40 @@
                        break;
                case B_ASSIGNVGROUP:
                        assign_verts_defgroup ();
+                       DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        allqueue (REDRAWVIEW3D, 1);
                        BIF_undo_push("Assign to vertex group");
                        break;
                case B_REMOVEVGROUP:
                        remove_verts_defgroup (0);
+                       DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        allqueue (REDRAWVIEW3D, 1);
                        allqueue(REDRAWOOPS, 0);
                        BIF_undo_push("Remove from vertex group");
                        break;
                case B_SELVGROUP:
-                       sel_verts_defgroup(1);
+                       sel_verts_defgroup(1); /* runs countall() */
                        allqueue (REDRAWVIEW3D, 1);
                        allqueue(REDRAWOOPS, 0);
-                       countall();
+                       BIF_undo_push("Select vertex group");
                        break;
                case B_DESELVGROUP:
-                       sel_verts_defgroup(0);
-                       DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
+                       sel_verts_defgroup(0); /* runs countall() */
                        allqueue (REDRAWVIEW3D, 1);
                        allqueue(REDRAWOOPS, 0);
-                       countall();
+                       BIF_undo_push("DeSelect vertex group");
                        break;
                case B_LINKEDVGROUP:
                        copy_linked_vgroup_channels(ob);
+                       allqueue (REDRAWVIEW3D, 1);
+                       allqueue(REDRAWOOPS, 0);
+                       BIF_undo_push("Copy vertex group to linked obdata");
                        break;
                case B_COPYVGROUP:
                        duplicate_defgroup (ob);
                        scrarea_queue_winredraw (curarea);
                        allqueue (REDRAWOOPS, 0);
+                       BIF_undo_push("Copy vertex group");
                        break;
        }
 }


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to