diff --git a/Source/General/General.cs b/Source/General/General.cs index 2f126866..d1c7a592 100644 --- a/Source/General/General.cs +++ b/Source/General/General.cs @@ -663,7 +663,7 @@ namespace CodeImp.DoomBuilder map = new MapManager(); if(map.InitializeOpenMap(filename, openmapwindow.Options)) { - // Done + // Add recent file mainwindow.AddRecentFile(filename); } else @@ -701,7 +701,11 @@ namespace CodeImp.DoomBuilder Cursor.Current = Cursors.WaitCursor; // Save the map - map.SaveMap(map.FilePathName, MapManager.SAVE_NORMAL); + if(map.SaveMap(map.FilePathName, MapManager.SAVE_NORMAL)) + { + // Add recent file + mainwindow.AddRecentFile(map.FilePathName); + } // All done mainwindow.UpdateInterface(); @@ -731,7 +735,11 @@ namespace CodeImp.DoomBuilder Cursor.Current = Cursors.WaitCursor; // Save the map - map.SaveMap(savefile.FileName, MapManager.SAVE_AS); + if(map.SaveMap(savefile.FileName, MapManager.SAVE_AS)) + { + // Add recent file + mainwindow.AddRecentFile(map.FilePathName); + } // All done mainwindow.UpdateInterface(); diff --git a/Source/Interface/MainForm.cs b/Source/Interface/MainForm.cs index c72ff610..2214cc34 100644 --- a/Source/Interface/MainForm.cs +++ b/Source/Interface/MainForm.cs @@ -609,6 +609,9 @@ namespace CodeImp.DoomBuilder.Interface recentitems[0].Text = GetDisplayFilename(filename); recentitems[0].Tag = filename; recentitems[0].Visible = true; + + // Hide the no recent item + itemnorecent.Visible = false; } // This returns the trimmed file/path string