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 -
This commit is contained in:
maxim 2016-02-06 14:00:56 +00:00
parent c5e0a33841
commit 314291368a
2 changed files with 2 additions and 14 deletions

View File

@ -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;

View File

@ -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);