mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
882bafcbb3
commit
efbcb4f8c6
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue