IDE: close file: add to recent, bug #12351

git-svn-id: trunk@19652 -
This commit is contained in:
mattias 2009-04-27 18:48:16 +00:00
parent 5f4c6b579f
commit 595dd727a8

View File

@ -5014,6 +5014,7 @@ begin
// get final filename
NewFilename:=NewSource.Filename;
NewFilePath:=ExtractFilePath(NewFilename);
EnvironmentOptions.RemoveFromRecentOpenFiles(OldFilename);
EnvironmentOptions.AddToRecentOpenFiles(NewFilename);
SetRecentFilesMenu;
@ -7393,6 +7394,14 @@ begin
Result:=mrOk;
end;
// add to recent file list
if (not ActiveUnitInfo.IsVirtual)
and (not (cfProjectClosing in Flags)) then
begin
EnvironmentOptions.AddToRecentOpenFiles(ActiveUnitInfo.Filename);
SetRecentFilesMenu;
end;
// close form soft (keep it if used by another component)
CloseUnitComponent(ActiveUnitInfo,[]);