diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index e32339c8b..feb877d54 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -643,8 +643,8 @@ void ArrayCtrl::SyncCtrls(int from) LTIMING("SyncCtrls"); if(!hasctrls) return; - Ptr 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) diff --git a/uppsrc/CtrlLib/FileSel.cpp b/uppsrc/CtrlLib/FileSel.cpp index 8d3885563..31da94e82 100644 --- a/uppsrc/CtrlLib/FileSel.cpp +++ b/uppsrc/CtrlLib/FileSel.cpp @@ -1656,6 +1656,7 @@ FileSel::FileSel() { AddStandardPlaces(); list.AutoHideSb(); + places.AutoHideSb(); } FileSel::~FileSel() {}