mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-25 22:03:45 -06:00
*CtrlLib: Another ArrayCtrl tab order fix
git-svn-id: svn://ultimatepp.org/upp/trunk@2282 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
48b7e185b3
commit
39dcdf2217
2 changed files with 5 additions and 4 deletions
|
|
@ -643,8 +643,8 @@ void ArrayCtrl::SyncCtrls(int from)
|
|||
LTIMING("SyncCtrls");
|
||||
if(!hasctrls)
|
||||
return;
|
||||
Ptr<Ctrl> restorefocus = GetFocusChildDeep();
|
||||
Size sz = GetSize();
|
||||
Ctrl *p = NULL;
|
||||
for(int i = from; i < array.GetCount(); i++)
|
||||
for(int j = 0; j < column.GetCount(); j++) {
|
||||
bool ct = IsCtrl(i, j);
|
||||
|
|
@ -662,15 +662,15 @@ void ArrayCtrl::SyncCtrls(int from)
|
|||
if(ct) {
|
||||
Rect r = GetCellRectM(i, j);
|
||||
Ctrl& c = GetCellCtrl(i, j);
|
||||
AddChild(&c);
|
||||
if(!c.HasFocusDeep() || c.GetParent() != this)
|
||||
AddChild(&c, p);
|
||||
p = &c;
|
||||
if(r.bottom < 0 || r.top > sz.cy)
|
||||
c.SetRect(-1000, -1000, 1, 1);
|
||||
else
|
||||
c.SetRect(r);
|
||||
}
|
||||
}
|
||||
if(restorefocus)
|
||||
restorefocus->SetFocus();
|
||||
}
|
||||
|
||||
Point ArrayCtrl::FindCellCtrl(Ctrl *ctrl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue