mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
GridCtrl: Fixed warnings
git-svn-id: svn://ultimatepp.org/upp/trunk@12942 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dab5db8fa6
commit
1c8db95e61
2 changed files with 12 additions and 7 deletions
|
|
@ -194,7 +194,6 @@ void DropGrid::Paint(Draw& w)
|
|||
else
|
||||
clear.Hide();
|
||||
|
||||
GridDisplay &disp = display ? *display : list.GetDisplay();
|
||||
bool hf = HasFocus();
|
||||
bool isnull = rowid < 0;
|
||||
Color fg = hf ? SColorHighlightText() : IsEnabled() ? SColorText() : SColorDisabled();
|
||||
|
|
|
|||
|
|
@ -1091,8 +1091,10 @@ GridCtrl::Item& GridCtrl::GetItemSize(int &r, int &c, int &x, int &y, int &cx, i
|
|||
if(skip)
|
||||
return *it;
|
||||
|
||||
while(c >= 0 && items[idy][hitems[c].id].group == group) --c; ++c;
|
||||
while(r >= 0 && items[vitems[r].id][idx].group == group) --r; ++r;
|
||||
while(c >= 0 && items[idy][hitems[c].id].group == group) --c;
|
||||
++c;
|
||||
while(r >= 0 && items[vitems[r].id][idx].group == group) --r;
|
||||
++r;
|
||||
|
||||
dx = it->cx;
|
||||
dy = it->cy;
|
||||
|
|
@ -2622,12 +2624,14 @@ Rect GridCtrl::GetItemRect(int r, int c, bool hgrid, bool vgrid, bool hrel, bool
|
|||
{
|
||||
int group = it.group;
|
||||
|
||||
while(r > fixed_rows && items[vitems[r].id][idx].group == group) --r; ++r;
|
||||
while(r > fixed_rows && items[vitems[r].id][idx].group == group) --r;
|
||||
++r;
|
||||
|
||||
top = vitems[r].nTop(dy);
|
||||
bottom = vitems[r + it.cy].nBottom(dy);
|
||||
|
||||
while(c > fixed_cols && items[idy][hitems[c].id].group == group) --c; ++c;
|
||||
while(c > fixed_cols && items[idy][hitems[c].id].group == group) --c;
|
||||
++c;
|
||||
|
||||
left = hitems[c].nLeft(dx);
|
||||
right = hitems[c + it.cx].nRight(dx);
|
||||
|
|
@ -4404,9 +4408,11 @@ void GridCtrl::RefreshRow(int n, bool relative, bool fixed)
|
|||
if(join > 0)
|
||||
{
|
||||
int s = n;
|
||||
while(s >= 0 && vitems[s].join > 0) s--; s++;
|
||||
while(s >= 0 && vitems[s].join > 0) s--;
|
||||
s++;
|
||||
int e = n;
|
||||
while(e < total_rows && vitems[e].join > 0) e++; e--;
|
||||
while(e < total_rows && vitems[e].join > 0) e++;
|
||||
e--;
|
||||
Refresh(Rect(0, vitems[s].nTop(dy), GetSize().cx, vitems[e].nBottom(dy)));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue