From 595dd727a85da3039a511a50982f7ce8dbbe60b1 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 27 Apr 2009 18:48:16 +0000 Subject: [PATCH] IDE: close file: add to recent, bug #12351 git-svn-id: trunk@19652 - --- ide/main.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ide/main.pp b/ide/main.pp index fc79c2aaf3..2d8b606453 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -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,[]);