GridCtrl: Fixed invalid cursor state in DoInsert/DoRemove

git-svn-id: svn://ultimatepp.org/upp/trunk@2823 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
unodgs 2010-10-26 19:34:35 +00:00
parent 882bafcbb3
commit efbcb4f8c6

View file

@ -7145,6 +7145,7 @@ void GridCtrl::DoInsert0(bool edit, bool after)
Insert0(curpos.y, 1, true, true, GD_ROW_HEIGHT);
int y = curpos.y;
curpos.y = -1;
valid_cursor = false;
call_whenchangecol = false;
call_whenchangerow = false;
SetCursor0(curpos.x, y > total_rows - 1 ? total_rows - 1 : y);
@ -7266,6 +7267,7 @@ void GridCtrl::DoRemove()
UpdateSb();
Refresh();
curpos.y = -1;
valid_cursor = false;
SetCursor0(curpos.x < 0 ? firstVisCol : curpos.x, max(fixed_rows, min(total_rows - 1, y)), 0, 0, -1);
shiftpos = curpos;
}