Merge with trunk r39000
[blender.git] / source / blender / editors / interface / interface_templates.c
index 3c29369c6ac5ace2f82fdb65e0ddce0256614ba5..cadcf959ace1b07bab5ca4ebb1f5df615508b5c4 100644 (file)
@@ -2224,7 +2224,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);
@@ -2239,7 +2239,6 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
        }
        else if(listtype == 'c') {
                /* compact layout */
-               found= 0;
 
                row= uiLayoutRow(layout, 1);