Merging r38733 through r38779 from trunk into soc-2011-tomato
[blender-staging.git] / source / blender / editors / interface / interface_templates.c
index 311684d5e7e99f3d1007183e56bf2744735ac2ab..b6e6bc1dfc2299a286c4d7b53d68099d03c03155 100644 (file)
@@ -2197,7 +2197,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
                        /* create list items */
                        RNA_PROP_BEGIN(ptr, itemptr, prop) {
                                /* create button */
-                               if(i == 9)
+                               if(!(i % 9))
                                        row= uiLayoutRow(col, 0);
 
                                icon= list_item_icon_get(C, &itemptr, rnaicon, 1);
@@ -2212,7 +2212,6 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
        }
        else if(listtype == 'c') {
                /* compact layout */
-               found= 0;
 
                row= uiLayoutRow(layout, 1);