From 314291368a6a87e992425d2ef31c52a2fe2d02e1 Mon Sep 17 00:00:00 2001 From: maxim Date: Sat, 6 Feb 2016 14:00:56 +0000 Subject: [PATCH] Merged revision(s) 51334 #4c08c761dc, 51359 #685cfd6bbc, 51361 #871f631591 from trunk: LCL: don't prevent AutoSizeDelayedHandle for minimized windows. Issue #29445 ........ LCL: fixed crash with sparta docked , added check for Target <> nil in SetFocusedControl. ........ LCL: Don't turn TScrollBar.Visible False when changing Kind property. AScrollBar.Show did not work due to flag tests. Issue #29422 ........ git-svn-id: branches/fixes_1_6@51515 - --- lcl/include/customform.inc | 4 +--- lcl/interfaces/gtk2/gtk2wsstdctrls.pp | 12 +----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index e7774f6e49..80f5940a3e 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -2226,8 +2226,6 @@ end; ------------------------------------------------------------------------------} function TCustomForm.AutoSizeDelayedHandle: Boolean; begin - if WindowState=wsMinimized then - exit(true); if (Parent<>nil) or (ParentWindow<>0) then // this form is inlined / embedded it works like a normal TWinControl Result:=inherited AutoSizeDelayedHandle @@ -2309,7 +2307,7 @@ function TCustomForm.SetFocusedControl(Control: TWinControl): Boolean; function NextChildControl(CurParent, Target: TWinControl): TWinControl; inline; begin - while Target.Parent <> CurParent do + while (Target <> nil) and (Target.Parent <> CurParent) do Target := Target.Parent; Result := Target; end; diff --git a/lcl/interfaces/gtk2/gtk2wsstdctrls.pp b/lcl/interfaces/gtk2/gtk2wsstdctrls.pp index 7d3dc38300..a348ca1020 100644 --- a/lcl/interfaces/gtk2/gtk2wsstdctrls.pp +++ b/lcl/interfaces/gtk2/gtk2wsstdctrls.pp @@ -2686,20 +2686,10 @@ end; class procedure TGtk2WSScrollBar.SetKind(const AScrollBar: TCustomScrollBar; const AIsHorizontal: Boolean); -var - B: Boolean; begin if not AScrollBar.HandleAllocated then exit; - B := AScrollBar.Visible; - if B then - AScrollBar.Hide; - try - RecreateWnd(AScrollBar); - finally - if B then - AScrollBar.Show; - end; + RecreateWnd(AScrollBar); end; class procedure TGtk2WSScrollBar.SetParams(const AScrollBar: TCustomScrollBar);