recent files fix

This commit is contained in:
codeimp 2007-10-15 07:50:28 +00:00
parent 43700afcfb
commit 3f2d296376
2 changed files with 14 additions and 3 deletions

View file

@ -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();

View file

@ -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