mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 06:38:06 +02:00
Converter: Simplify single unit conversion. fOwnerConverter.fAllCommentedUnits is Nil then.
git-svn-id: trunk@56663 -
This commit is contained in:
parent
be0dcc0b50
commit
12ad076089
@ -724,12 +724,8 @@ begin
|
||||
ExtractFileName(fLazUnitFilename), fOwnerConverter.fSettings.SupportDelphi);
|
||||
case Result of
|
||||
// mrOK means: Comment out.
|
||||
mrOK: begin
|
||||
if fOwnerConverter is TConvertDelphiProjPack then
|
||||
MoveMissingToComment(fOwnerConverter.fAllCommentedUnits)
|
||||
else
|
||||
MoveMissingToComment(Nil);
|
||||
end;
|
||||
mrOK:
|
||||
MoveMissingToComment(fOwnerConverter.fAllCommentedUnits);
|
||||
// mrYes means: Search for unit path.
|
||||
mrYes: begin
|
||||
UnitDirDialog:=TSelectDirectoryDialog.Create(nil);
|
||||
|
@ -463,8 +463,9 @@ procedure TUsedUnits.CommentAutomatic(ACommentedUnits: TStringList);
|
||||
var
|
||||
i, x: Integer;
|
||||
begin
|
||||
if ACommentedUnits = Nil then Exit;
|
||||
for i:=fMissingUnits.Count-1 downto 0 do begin
|
||||
if Assigned(ACommentedUnits) and ACommentedUnits.Find(fMissingUnits[i], x) then
|
||||
if ACommentedUnits.Find(fMissingUnits[i], x) then
|
||||
begin
|
||||
fUnitsToComment.Add(fMissingUnits[i]);
|
||||
fMissingUnits.Delete(i);
|
||||
|
Loading…
Reference in New Issue
Block a user