From dbcecc82ab545dc7310f64192f8143c6168f637d Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 11 Feb 2010 09:14:52 +0000 Subject: [PATCH] IDE: delphi converter: fix missing units after removing windows unit, bug #15641 git-svn-id: trunk@23686 - --- converter/delphiproject2laz.pas | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/converter/delphiproject2laz.pas b/converter/delphiproject2laz.pas index c3d36e2683..7eac3b2f13 100644 --- a/converter/delphiproject2laz.pas +++ b/converter/delphiproject2laz.pas @@ -703,15 +703,6 @@ begin Result:=CheckFilenameForLCLPaths(LazarusUnitFilename); if Result<>mrOk then exit; - // fix or comment missing units - DebugLn('ConvertDelphiToLazarusUnit FixMissingUnits'); - Result:=FixMissingUnits(LazarusUnitFilename,cdtlufIsSubProc in Flags,true); - if Result=mrAbort then exit; - if (Result<>mrOk) then begin - Result:=JumpToCodetoolErrorAndAskToAbort(cdtlufIsSubProc in Flags); - exit; - end; - // add {$mode delphi} directive // remove windows unit and add LResources, LCLIntf // remove {$R *.dfm} or {$R *.xfm} directive @@ -724,6 +715,15 @@ begin cdtlufIsSubProc in Flags,Result) then exit; + // fix or comment missing units + DebugLn('ConvertDelphiToLazarusUnit FixMissingUnits'); + Result:=FixMissingUnits(LazarusUnitFilename,cdtlufIsSubProc in Flags,true); + if Result=mrAbort then exit; + if (Result<>mrOk) then begin + Result:=JumpToCodetoolErrorAndAskToAbort(cdtlufIsSubProc in Flags); + exit; + end; + if cdtlufCheckLFM in Flags then begin // check the LFM file and the pascal unit DebugLn('ConvertDelphiToLazarusUnit Check new .lfm and .pas file');