Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-08-27 19:27:41 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-08-27 19:27:41 +0400
commit6b51c274149d854f57f2f1865578942a87e78869 (patch)
treefa73ee4d1547729da976226a0d7723f2c73c2ab0 /source/blender/blenkernel/intern/screen.c
parent07aaf4a90a906f5e1f7681db6f1067e286ffe568 (diff)
uiLists enhacements: dragresize and better GRID layout.
Many thanks to Brecht for the review! * You can now drag-resize uiLists (in default or grid layouts). ** Note about "default" size: when you drag below minimal size of the uiList, it will automatically reset to automatic sizing (i.e. size between rows and maxrows, depending on the number of items to show). This often means (e.g. in Materials list with many mat slots) that the list will grow again to maxrows! * Grid uiLists now have a customizable number of columns (previously it was a fixed value of 9), and they will respect the rows/maxrows settings as well (i.e. show a scrollbar when needed), instead of growing indefinitly!
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r--source/blender/blenkernel/intern/screen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index fe2f52d79fd..924cdff798d 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -267,6 +267,8 @@ void BKE_spacedata_draw_locks(int set)
/* not region itself */
void BKE_area_region_free(SpaceType *st, ARegion *ar)
{
+ uiList *uilst;
+
if (st) {
ARegionType *art = BKE_regiontype_from_id(st, ar->regiontype);
@@ -285,6 +287,12 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
}
BLI_freelistN(&ar->panels);
+
+ for (uilst = ar->ui_lists.first; uilst; uilst = uilst->next) {
+ if (uilst->dyn_data) {
+ MEM_freeN(uilst->dyn_data);
+ }
+ }
BLI_freelistN(&ar->ui_lists);
}