diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 14 |
2 files changed, 23 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index c883bdf74e0..3c0928d38a0 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -189,9 +189,15 @@ typedef struct PanelType { /* uilist types */ -/* draw an item in the uiList */ +/* Draw an item in the uiList */ typedef void (*uiListDrawItemFunc)(struct uiList *, struct bContext *, struct uiLayout *, struct PointerRNA *, - struct PointerRNA *, int, struct PointerRNA *, const char *, int); + struct PointerRNA *, int, struct PointerRNA *, const char *, int, int); + +/* Draw the filtering part of an uiList */ +typedef void (*uiListDrawFilterFunc)(struct uiList *, struct bContext *, struct uiLayout *); + +/* Filter items of an uiList */ +typedef void (*uiListFilterItemsFunc)(struct uiList *, struct bContext *, struct PointerRNA *, const char *); typedef struct uiListType { struct uiListType *next, *prev; @@ -199,6 +205,8 @@ typedef struct uiListType { char idname[BKE_ST_MAXNAME]; /* unique name */ uiListDrawItemFunc draw_item; + uiListDrawFilterFunc draw_filter; + uiListFilterItemsFunc filter_items; /* RNA integration */ ExtensionRNA ext; diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 924cdff798d..efcbcacf974 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -47,6 +47,7 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" +#include "BKE_idprop.h" #include "BKE_screen.h" /* ************ Spacetype/regiontype handling ************** */ @@ -290,7 +291,18 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar) for (uilst = ar->ui_lists.first; uilst; uilst = uilst->next) { if (uilst->dyn_data) { - MEM_freeN(uilst->dyn_data); + uiListDyn *dyn_data = uilst->dyn_data; + if (dyn_data->items_filter_flags) { + MEM_freeN(dyn_data->items_filter_flags); + } + if (dyn_data->items_filter_neworder) { + MEM_freeN(dyn_data->items_filter_neworder); + } + MEM_freeN(dyn_data); + } + if (uilst->properties) { + IDP_FreeProperty(uilst->properties); + MEM_freeN(uilst->properties); } } BLI_freelistN(&ar->ui_lists); |