Cleanup code to set Tabsheet.Caption

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2321 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
lazarus-bart
2012-02-29 10:56:52 +00:00
parent fc6cac6a8f
commit c6d8a731af

View File

@ -989,27 +989,14 @@ var
TS: TTabSheet;
E: TEditor;
PgIdx: Integer;
i, NrOfNoNames: Integer;
Suffix: String;
begin
Result := nil;
Inc(FCounter);
{
NrOfNoNames := 0;
Suffix := '';
for i := 0 to PageCount - 1 do
if Pos(vTranslations.NoName, Pages[i].Caption) = 1 then Inc(NrOfNoNames);
if NrOfNoNames > 0 then Suffix := ' [' + IntToStr(NrOfNoNames + 1) + ']';
}
TS := TTabSheet.Create(Self);
TS.Name := 'TS' + IntToStr(FCounter);
TS.PageControl := Self;
PgIdx := TS.PageIndex;
TS.Caption := vTranslations.NoName + Suffix;
// exit;//<-------------------------------------------------------------
E := TEditor.Create(TS);
Result := E;
E.FileMaskList := FFileTypeMaskList;