mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 13:39:11 +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);
|
ExtractFileName(fLazUnitFilename), fOwnerConverter.fSettings.SupportDelphi);
|
||||||
case Result of
|
case Result of
|
||||||
// mrOK means: Comment out.
|
// mrOK means: Comment out.
|
||||||
mrOK: begin
|
mrOK:
|
||||||
if fOwnerConverter is TConvertDelphiProjPack then
|
MoveMissingToComment(fOwnerConverter.fAllCommentedUnits);
|
||||||
MoveMissingToComment(fOwnerConverter.fAllCommentedUnits)
|
|
||||||
else
|
|
||||||
MoveMissingToComment(Nil);
|
|
||||||
end;
|
|
||||||
// mrYes means: Search for unit path.
|
// mrYes means: Search for unit path.
|
||||||
mrYes: begin
|
mrYes: begin
|
||||||
UnitDirDialog:=TSelectDirectoryDialog.Create(nil);
|
UnitDirDialog:=TSelectDirectoryDialog.Create(nil);
|
||||||
|
@ -463,8 +463,9 @@ procedure TUsedUnits.CommentAutomatic(ACommentedUnits: TStringList);
|
|||||||
var
|
var
|
||||||
i, x: Integer;
|
i, x: Integer;
|
||||||
begin
|
begin
|
||||||
|
if ACommentedUnits = Nil then Exit;
|
||||||
for i:=fMissingUnits.Count-1 downto 0 do begin
|
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
|
begin
|
||||||
fUnitsToComment.Add(fMissingUnits[i]);
|
fUnitsToComment.Add(fMissingUnits[i]);
|
||||||
fMissingUnits.Delete(i);
|
fMissingUnits.Delete(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user