- bugfix for icon listview where the icons would only wrap once
authorCampbell Barton <ideasman42@gmail.com>
Tue, 26 Jul 2011 19:47:56 +0000 (19:47 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 26 Jul 2011 19:47:56 +0000 (19:47 +0000)
- also quiet some clang warnings

source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_templates.c

index e9ec4cc..c5275ea 100644 (file)
@@ -1879,7 +1879,6 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
                                if(but->autocomplete_func || data->searchbox) {
                                        changed= ui_textedit_autocomplete(C, but, data);
                                        update= 1; /* do live update for tab key */
-                                       retval= WM_UI_HANDLER_BREAK;
                                }
                                /* the hotkey here is not well defined, was G.qual so we check all */
                                else if(event->shift || event->ctrl || event->alt || event->oskey) {
@@ -2325,8 +2324,8 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa
                if(fac != 1.0f) {
                        /* snap in unit-space */
                        tempf /= fac;
-                       softmin /= fac;
-                       softmax /= fac;
+                       /* softmin /= fac; */ /* UNUSED */
+                       /* softmax /= fac; */ /* UNUSED */
                        softrange /= fac;
                }
 
@@ -3469,13 +3468,13 @@ static int ui_numedit_but_CURVE(uiBut *but, uiHandleButtonData *data, int snap,
        CurveMapping *cumap= (CurveMapping*)but->poin;
        CurveMap *cuma= cumap->cm+cumap->cur;
        CurveMapPoint *cmp= cuma->curve;
-       float fx, fy, zoomx, zoomy, offsx, offsy;
+       float fx, fy, zoomx, zoomy /*, offsx, offsy */ /* UNUSED */;
        int a, changed= 0;
 
        zoomx= (but->x2-but->x1)/(cumap->curr.xmax-cumap->curr.xmin);
        zoomy= (but->y2-but->y1)/(cumap->curr.ymax-cumap->curr.ymin);
-       offsx= cumap->curr.xmin;
-       offsy= cumap->curr.ymin;
+       /* offsx= cumap->curr.xmin; */
+       /* offsy= cumap->curr.ymin; */
 
        if(snap) {
                float d[2];
index 79a90fb..b309198 100644 (file)
@@ -1615,7 +1615,7 @@ static void ui_litem_layout_row(uiLayout *litem)
        int x, y, w, tot, totw, neww, itemw, minw, itemh, offset;
        int fixedw, freew, fixedx, freex, flag= 0, lastw= 0;
 
-       x= litem->x;
+       /* x= litem->x; */ /* UNUSED */
        y= litem->y;
        w= litem->w;
        totw= 0;
index 9ed3cab..3b20533 100644 (file)
@@ -575,8 +575,8 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
                ui_draw_tria_rect(&itemrect, 'h');
        else
                ui_draw_tria_rect(&itemrect, 'v');
-       
-       
+
+       (void)ofsx;
 }
 
 /************************** panel alignment *************************/
index f388710..3431549 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);