Bugfix to allow list templates to have more than 5 rows when you set

it in the python script, didn't work correct with scrolling.
This commit is contained in:
Brecht Van Lommel
2009-10-21 09:17:46 +00:00
parent f4d6bbd656
commit 1f33a90f05

View File

@@ -2117,7 +2117,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
if(prop)
len= RNA_property_collection_length(ptr, prop);
items= CLAMPIS(len, rows, 5);
items= CLAMPIS(len, rows, MAX2(rows, 5));
pa->list_scroll= MIN2(pa->list_scroll, len-items);
pa->list_scroll= MAX2(pa->list_scroll, 0);