lcl: formatting

git-svn-id: trunk@28440 -
This commit is contained in:
paul 2010-11-24 02:40:01 +00:00
parent ef88560836
commit 7779bd4654
2 changed files with 9 additions and 10 deletions

View File

@ -242,7 +242,7 @@ type
csDestroyingHandle, csDestroyingHandle,
csDocking, csDocking,
csVisibleSetInLoading csVisibleSetInLoading
); );
TControlState = set of TControlStateType; TControlState = set of TControlStateType;

View File

@ -185,8 +185,8 @@ begin
FDefaultControl := nil; FDefaultControl := nil;
if AComponent = FCancelControl then if AComponent = FCancelControl then
FCancelControl := nil; FCancelControl := nil;
if AComponent=FLastFocusedControl then if AComponent = FLastFocusedControl then
FLastFocusedControl:=nil; FLastFocusedControl := nil;
// then do stuff which can trigger things // then do stuff which can trigger things
if (FActionLists <> nil) and (AComponent is TCustomActionList) then if (FActionLists <> nil) and (AComponent is TCustomActionList) then
DoRemoveActionList(TCustomActionList(AComponent)) DoRemoveActionList(TCustomActionList(AComponent))
@ -1128,12 +1128,12 @@ end;
procedure TCustomForm.SetParent(NewParent: TWinControl); procedure TCustomForm.SetParent(NewParent: TWinControl);
begin begin
if Parent=NewParent then exit; if Parent = NewParent then exit;
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomForm.SetParent'){$ENDIF}; DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomForm.SetParent'){$ENDIF};
try try
if HandleAllocated then DestroyHandle; if HandleAllocated then DestroyHandle;
inherited SetParent(NewParent); inherited SetParent(NewParent);
if (Parent=nil) and Visible then if (Parent = nil) and Visible then
HandleNeeded; HandleNeeded;
finally finally
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomForm.SetParent'){$ENDIF}; EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomForm.SetParent'){$ENDIF};
@ -2233,7 +2233,7 @@ function TCustomForm.SetFocusedControl(Control: TWinControl): Boolean;
while not FLastFocusedControl.ContainsControl(Control) do while not FLastFocusedControl.ContainsControl(Control) do
begin begin
LastState := SaveFocusState; LastState := SaveFocusState;
if FLastFocusedControl=nil then exit(false); if FLastFocusedControl = nil then Exit(False);
// calling of CM_EXIT can cause other focus changes - so FLastFocusedControl can change after the call // calling of CM_EXIT can cause other focus changes - so FLastFocusedControl can change after the call
// therefore we need to change it before the call // therefore we need to change it before the call
Tmp := FLastFocusedControl; Tmp := FLastFocusedControl;
@ -2247,7 +2247,7 @@ function TCustomForm.SetFocusedControl(Control: TWinControl): Boolean;
while FLastFocusedControl <> Control do while FLastFocusedControl <> Control do
begin begin
SetLastFocusedControl(NextChildControl(FLastFocusedControl, Control)); SetLastFocusedControl(NextChildControl(FLastFocusedControl, Control));
if FLastFocusedControl=nil then exit(false); if FLastFocusedControl = nil then Exit(False);
LastState := SaveFocusState; LastState := SaveFocusState;
FLastFocusedControl.Perform(CM_ENTER, 0, 0); FLastFocusedControl.Perform(CM_ENTER, 0, 0);
if SaveFocusState <> LastState then if SaveFocusState <> LastState then
@ -2333,7 +2333,7 @@ begin
begin begin
if CurControl is TCustomForm then begin if CurControl is TCustomForm then begin
{$IFDEF VerboseFocus} {$IFDEF VerboseFocus}
if TCustomForm(CurControl).FActiveControl<>Control then if TCustomForm(CurControl).FActiveControl <> Control then
debugln(['TCustomForm.SetFocusedControl Self=',DbgSName(Self),' SomeParent=',DbgSName(CurControl),' OldActiveControl=',DbgSName(TCustomForm(CurControl).FActiveControl),' New=',DbgSName(Control)]); debugln(['TCustomForm.SetFocusedControl Self=',DbgSName(Self),' SomeParent=',DbgSName(CurControl),' OldActiveControl=',DbgSName(TCustomForm(CurControl).FActiveControl),' New=',DbgSName(Control)]);
{$ENDIF} {$ENDIF}
TCustomForm(CurControl).FActiveControl := Control; TCustomForm(CurControl).FActiveControl := Control;
@ -2352,8 +2352,7 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TCustomForm Method WantChildKey TCustomForm Method WantChildKey
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TCustomForm.WantChildKey(Child : TControl; function TCustomForm.WantChildKey(Child : TControl; var Message : TLMessage):Boolean;
var Message : TLMessage):Boolean;
begin begin
Result := False; Result := False;
end; end;