mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-01 15:52:41 -06:00
GridCtrl: Fixed live cursor not disappearing when mouse moves outside control view, fixed live cursor not changing row when mouse enters child control
git-svn-id: svn://ultimatepp.org/upp/trunk@6268 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
fa4caceee7
commit
a8d393c4b5
1 changed files with 14 additions and 2 deletions
|
|
@ -2472,6 +2472,18 @@ void GridCtrl::ChildAction(Ctrl *child, int event)
|
|||
WhenCtrlAction();
|
||||
}
|
||||
}
|
||||
|
||||
if(event == MOUSEMOVE)
|
||||
{
|
||||
if(live_cursor)
|
||||
{
|
||||
Point p = GetMouseViewPos();
|
||||
if(IsMouseBody(p))
|
||||
SetCursor0(p, CU_MOUSE | CU_HIGHLIGHT);
|
||||
else
|
||||
SetCursor0(-1, -1, CU_HIGHLIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GridCtrl::ChildMouseEvent(Ctrl *child, int event, Point p, int zdelta, dword keyflags)
|
||||
|
|
@ -3410,7 +3422,7 @@ GridCtrl::CurState GridCtrl::SetCursor0(Point p, int opt, int dirx, int diry)
|
|||
else
|
||||
tmpcur = p;
|
||||
|
||||
if(dirx == 0 && diry == 0 && !IsValidCursor(tmpcur))
|
||||
if(!highlight && dirx == 0 && diry == 0 && !IsValidCursor(tmpcur))
|
||||
{
|
||||
cs.valid = false;
|
||||
return cs;
|
||||
|
|
@ -5710,7 +5722,7 @@ void GridCtrl::SwapDown(int cnt)
|
|||
|
||||
void GridCtrl::MouseLeave()
|
||||
{
|
||||
if(live_cursor)
|
||||
if(live_cursor && !HasMouseDeep())
|
||||
SetCursor0(-1, -1, CU_HIGHLIGHT);
|
||||
UpdateHighlighting(GS_BORDER, Point(0, 0));
|
||||
oldSplitCol = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue