Bugfix #26462
authorTon Roosendaal <ton@blender.org>
Fri, 18 Mar 2011 16:09:29 +0000 (16:09 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 18 Mar 2011 16:09:29 +0000 (16:09 +0000)
Using "search menu" for browsing ID data (material, texture, brush)
wasn't sending an undo-push after use. This messed up undo or redo.

source/blender/editors/interface/interface_templates.c

index 3737cb7e38062264c60a7f8764717bef6e1560f2..0914ebaa96fd351481db4541ac2b44897fdc92d6 100644 (file)
@@ -191,6 +191,8 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
        
        /* give search-field focus */
        uiButSetFocusOnEnter(win, but);
+       /* this type of search menu requires undo */
+       but->flag |= UI_BUT_UNDO;
        
        return block;
 }