mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 15:28:14 +02:00
IDE: closing hidden designer form only on revert
git-svn-id: trunk@14916 -
This commit is contained in:
parent
62f6ee1fed
commit
963a81e03f
19
ide/main.pp
19
ide/main.pp
@ -5258,12 +5258,6 @@ var
|
||||
LFMFilename: string;
|
||||
LFMBuf: TCodeBuffer;
|
||||
begin
|
||||
Result:=CloseUnitComponent(AnUnitInfo,CloseFlags);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn(['TMainIDE.DoLoadLFM failed due to CloseUnitComponent for file ',AnUnitInfo.Filename]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
// Note: think about virtual and normal .lfm files.
|
||||
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
||||
LFMBuf:=nil;
|
||||
@ -5280,8 +5274,7 @@ begin
|
||||
Result:=LoadIDECodeBuffer(LFMBuf,LFMFilename,[lbfUpdateFromDisk]);
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
Result:=DoLoadLFM(AnUnitInfo,LFMBuf,OpenFlags,
|
||||
CloseFlags-[cfSaveFirst,cfSaveDependencies]);
|
||||
Result:=DoLoadLFM(AnUnitInfo,LFMBuf,OpenFlags,CloseFlags);
|
||||
end;
|
||||
|
||||
function TMainIDE.DoLoadLFM(AnUnitInfo: TUnitInfo; LFMBuf: TCodeBuffer;
|
||||
@ -5303,10 +5296,12 @@ var
|
||||
begin
|
||||
debugln('TMainIDE.DoLoadLFM A ',AnUnitInfo.Filename,' IsPartOfProject=',dbgs(AnUnitInfo.IsPartOfProject),' ');
|
||||
|
||||
// close old designer form
|
||||
Result:=CloseUnitComponent(AnUnitInfo,CloseFlags);
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
if ofRevert in OpenFlags then begin
|
||||
// close old designer form
|
||||
Result:=CloseUnitComponent(AnUnitInfo,CloseFlags);
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
|
||||
// check installed packages
|
||||
if (AnUnitInfo.Component=nil) and AnUnitInfo.IsPartOfProject
|
||||
and (not (ofProjectLoading in OpenFlags)) then begin
|
||||
|
@ -77,7 +77,7 @@ type
|
||||
cfQuiet,
|
||||
cfProjectClosing,
|
||||
cfCloseDependencies,
|
||||
cfSaveDependencies // set cfSaveFirst to closing the dependencies
|
||||
cfSaveDependencies // set cfSaveFirst to close the dependencies
|
||||
);
|
||||
TCloseFlags = set of TCloseFlag;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user