LCL: fixed calling recursively ShowControl on TControl.Show

git-svn-id: trunk@46551 -
This commit is contained in:
mattias 2014-10-14 07:39:30 +00:00
parent ee30d04a07
commit 959a877e86
3 changed files with 5 additions and 5 deletions

View File

@ -916,7 +916,6 @@ procedure TCustomTabControl.ShowControl(APage: TControl);
var var
i: LongInt; i: LongInt;
begin begin
//inherited ShowControl(AControl);
{ Find a child control that matches the one passed in and display { Find a child control that matches the one passed in and display
the page that contains that control. This method is necessary the page that contains that control. This method is necessary
for compatibility with Delphi } for compatibility with Delphi }
@ -926,6 +925,7 @@ begin
Exit; Exit;
end; end;
end; end;
inherited ShowControl(APage);
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -233,8 +233,7 @@ begin
if AControl = ActivePageComponent then exit; if AControl = ActivePageComponent then exit;
i := FPageList.IndexOf(Pointer(aControl)); i := FPageList.IndexOf(Pointer(aControl));
if i >= 0 then if i >= 0 then
PageIndex := i PageIndex := i;
else inherited ShowControl(AControl);
inherited ShowControl(AControl);
end; end;

View File

@ -8395,7 +8395,8 @@ end;
Params: AControl: Control to show Params: AControl: Control to show
Returns: nothing Returns: nothing
Asks the parent to show ourself. Called by a child control (in TControl.Show), before setting Visible=true.
Asks to show the child control and recursively shows the parents.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TWinControl.ShowControl(AControl: TControl); procedure TWinControl.ShowControl(AControl: TControl);
begin begin