U++ Forum - RDF feed
https://www.ultimatepp.org/forums/
-
bug in gridcrtl
https://www.ultimatepp.org/forums/index.php?t=rview&goto=44603&th=9280#msg_44603
I created a grid control with columns.
I rearranged the order of some of the columns.
result.RemoveColumn ( 0, result.GetColumnCount() - 0 ); failed
void GridCtrl::RemoveColumn(int n, int count)
{
n += fixed_cols;
if(count < 0)
count = total_cols - n;
if(n < fixed_cols || n + count > total_cols)
return;
for(int i = 0; i < total_rows; i++)
items[i].Remove(n, count);
Vector<int> r;
for(int i = 0; i < count; i++)
{
if(edits[hitems[n + i].id].factory)
--genr_ctrls;
r.Add(hitems[n + i].id);
}
///////////BUG is HERE r is not sorted.... that is why Remove fails at assert later on
Upp::Sort(r); // solution
hitems.Remove(n, count);
rowbkp.Remove(r);
summary.Remove(r);
edits.Remove(r);
total_cols -= count;
recalc_cols = true;
valid_cursor = SetCursor0(min(curpos.x, total_cols - 1), curpos.y).IsValid();
Repaint(true);
}]]>
aftershock
2015-04-15T18:50:13-00:00
-
Re: bug in gridcrtl
https://www.ultimatepp.org/forums/index.php?t=rview&goto=48022&th=9280#msg_48022
Mirek]]>
mirek
2017-05-10T11:16:19-00:00