Bugfix #25652
[blender.git] / source / blender / editors / interface / interface.c
index 2620db30b3918ecd260c4e82bb1c7bb7f5c3b072..7a83ff0156a75986891510c6028a3609153023db 100644 (file)
@@ -2505,8 +2505,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
                }
        }
 
-       if(ELEM8(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, SEARCH_MENU, BUTM));
+       /* keep track of UI_interface.h */
+       if(ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM));
        else if(ELEM5(but->type, SCROLL, SEPR, LINK, INLINK, FTPREVIEW));
+       else if(but->type >= SEARCH_MENU);
        else but->flag |= UI_BUT_UNDO;
 
        BLI_addtail(&block->buttons, but);