mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 06:36:48 +02:00
fixed creating new package unit without used unit
git-svn-id: trunk@7188 -
This commit is contained in:
parent
3d37b16f09
commit
91b64942bf
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user