formatting

git-svn-id: trunk@21467 -
This commit is contained in:
paul 2009-08-27 17:17:53 +00:00
parent 94e36f9611
commit d17da7b5e3
2 changed files with 11 additions and 10 deletions

View File

@ -892,13 +892,14 @@ begin
Result:=DoCreateJITComponent('',NewClassName,NewUnitName,AncestorClass,Visible);
if Result<0 then exit;
ReadAncestorStreams;
ReadStream(BinStream,FCurReadJITComponent.ClassType);
ReadStream(BinStream, FCurReadJITComponent.ClassType);
if FCurReadJITComponent.Name='' then begin
NewName:=FCurReadJITComponent.ClassName;
if NewName[1] in ['T','t'] then
System.Delete(NewName,1,1);
FCurReadJITComponent.Name:=NewName;
if FCurReadJITComponent.Name = '' then
begin
NewName := FCurReadJITComponent.ClassName;
if NewName[1] in ['T', 't'] then
System.Delete(NewName, 1, 1);
FCurReadJITComponent.Name := NewName;
end;
except
on E: Exception do begin

View File

@ -2563,10 +2563,10 @@ procedure TControl.SetName(const Value: TComponentName);
var
ChangeText: Boolean;
begin
ChangeText := (csSetCaption in ControlStyle) and
not (csLoading in ComponentState) and (Name = Text) and
((Owner = nil) or not (Owner is TControl) or
not (csLoading in TControl(Owner).ComponentState));
ChangeText :=
(csSetCaption in ControlStyle) and not (csLoading in ComponentState) and
(Name = Text) and
((Owner = nil) or not (Owner is TControl) or not (csLoading in TControl(Owner).ComponentState));
inherited SetName(Value);
if ChangeText then Text := Value;