fixed creating new package unit without used unit

git-svn-id: trunk@7188 -
This commit is contained in:
mattias 2005-05-21 15:03:37 +00:00
parent 3d37b16f09
commit 91b64942bf
2 changed files with 6 additions and 1 deletions

View File

@ -1420,6 +1420,8 @@ begin
Parent:=NewComponentPage;
Caption:='...';
OnClick:=@ComponentUnitFileBrowseButtonClick;
ShowHint:=true;
Hint:='Open file dialog';
end;
ComponentUnitFileShortenButton:=TButton.Create(Self);
@ -1428,6 +1430,8 @@ begin
Parent:=NewComponentPage;
Caption:='<>';
OnClick:=@ComponentUnitFileShortenButtonClick;
ShowHint:=true;
Hint:='Shorten or expand filename';
end;
ComponentUnitNameLabel:=TLabel.Create(Self);

View File

@ -495,7 +495,8 @@ begin
// create sourcecode
LE:=LineEnding;
UsesLine:='Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs';
if System.Pos(Params.UsedUnitname,UsesLine)<1 then
if (System.Pos(Params.UsedUnitname,UsesLine)<1)
and (Params.UsedUnitname<>'') then
UsesLine:=UsesLine+', '+Params.UsedUnitname;
NewSource:=
'unit '+Params.UnitName+';'+LE