mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
GridCtrl: Fix in RemoveColumn
git-svn-id: svn://ultimatepp.org/upp/trunk@11027 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
1f7d92bd07
commit
dfb10fd93b
1 changed files with 8 additions and 0 deletions
|
|
@ -1825,13 +1825,21 @@ void GridCtrl::RemoveColumn(int n, int count)
|
|||
--genr_ctrls;
|
||||
r.Add(hitems[n + i].id);
|
||||
}
|
||||
|
||||
int id = hitems[n].id;
|
||||
|
||||
hitems.Remove(n, count);
|
||||
|
||||
rowbkp.Remove(r);
|
||||
summary.Remove(r);
|
||||
edits.Remove(r);
|
||||
total_cols -= count;
|
||||
recalc_cols = true;
|
||||
|
||||
for(int i = 0; i < total_cols; i++)
|
||||
if(hitems[i].id >= id)
|
||||
hitems[i].id -= count;
|
||||
|
||||
valid_cursor = SetCursor0(min(curpos.x, total_cols - 1), curpos.y).IsValid();
|
||||
Repaint(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue