Fix for bug #7447
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 10 Oct 2007 22:24:26 +0000 (22:24 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 10 Oct 2007 22:24:26 +0000 (22:24 +0000)
Pressing twice on a constraint or modifier button did 2 undo pushes,
the ROUNDBOX button they use also generated an undo push.

source/blender/src/interface.c

index 38584943d6ad11034c809861c089a03d8c99fac6..07debe8f8644a47015a7afe037c12e10220694c6 100644 (file)
@@ -4726,7 +4726,7 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent)
                                                /* add undo pushes if... */
                                                if( !(block->flag & UI_BLOCK_LOOP)) {
                                                        if(!G.obedit) {
                                                /* add undo pushes if... */
                                                if( !(block->flag & UI_BLOCK_LOOP)) {
                                                        if(!G.obedit) {
-                                                               if ELEM4(but->type, BLOCK, BUT, LABEL, PULLDOWN); 
+                                                               if ELEM5(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX); 
                                                                else {
                                                                        /* define which string to use for undo */
                                                                        if ELEM(but->type, LINK, INLINK) screen_delayed_undo_push("Add button link");
                                                                else {
                                                                        /* define which string to use for undo */
                                                                        if ELEM(but->type, LINK, INLINK) screen_delayed_undo_push("Add button link");