Converter: Load a unit to editor in a different way.

git-svn-id: trunk@27330 -
This commit is contained in:
juha 2010-09-12 13:38:38 +00:00
parent 2581056c23
commit 55bb3e8ffe

View File

@ -969,10 +969,9 @@ begin
Result:=ConvertFormFile;
Result:=CheckFailed(Result);
if Result<>mrOK then exit;
// Loading the form makes it appear in forms list. (Is there a better way?)
// fUnitInfo is set for projects only.
if Assigned(fUnitInfo) then
LazarusIDE.GetDesignerWithProjectFile(TUnitInfo(fUnitInfo), true);
// Load the unit and add it to project. fUnitInfo is set for projects only.
if Assigned(fUnitInfo) then //ofAddToRecent,
LazarusIDE.DoOpenEditorFile(fLazUnitFilename,0,[ofAddToProject,ofQuiet]);
// Close unit file after processing.
Result:=LazarusIDE.DoCloseEditorFile(fLazUnitFilename,[cfSaveFirst,cfQuiet]);
if Result<>mrOK then exit;