- bugfix for icon listview where the icons would only wrap once

- also quiet some clang warnings
This commit is contained in:
2011-07-26 19:47:56 +00:00
parent 3e81de486a
commit a460299b08
4 changed files with 9 additions and 11 deletions

View 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];

View 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;

View 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 *************************/

View 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);