Fix #19446: merge operator needs to be undone twice, interface
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 24 Sep 2009 10:46:52 +0000 (10:46 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 24 Sep 2009 10:46:52 +0000 (10:46 +0000)
was still doing undo pushes in cases it was not needed.

source/blender/editors/interface/interface.c

index f79f2f8c378e0a654bad8d303095328888d323f7..1b05958b67918a111eaeeeeee968f899991cfc4f 100644 (file)
@@ -2271,8 +2271,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
                }
        }
 
-       if(!ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, SEARCH_MENU))
-               but->flag |= UI_BUT_UNDO;
+       if(ELEM8(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, SEARCH_MENU, BUTM));
+       else if(ELEM5(but->type, SCROLL, SEPR, LINK, INLINK, FTPREVIEW));
+       else but->flag |= UI_BUT_UNDO;
 
        BLI_addtail(&block->buttons, but);