Add saved logs to recent file list immediately. Refs #197

This commit is contained in:
baldurk
2016-02-29 19:17:05 +01:00
parent bd9768451f
commit 94cf36b991
2 changed files with 5 additions and 1 deletions
@@ -395,6 +395,8 @@ namespace renderdocui.Windows
{
File.Copy(log.localpath, path, true);
log.saved = true;
m_Core.Config.AddRecentFile(m_Core.Config.RecentLogFiles, path, 10);
m_Main.PopulateRecentFiles();
}
catch (System.Exception ex)
{
+3 -1
View File
@@ -788,7 +788,7 @@ namespace renderdocui.Windows
statusText.Text = "Loading " + filename + "...";
}
private void PopulateRecentFiles()
public void PopulateRecentFiles()
{
while (recentFilesToolStripMenuItem.DropDownItems.Count > 0)
{
@@ -1247,6 +1247,8 @@ namespace renderdocui.Windows
// we copy the (possibly) temp log to the desired path, but the log item remains referring to the original path.
// This ensures that if the user deletes the saved path we can still open or re-save it.
File.Copy(m_Core.LogFileName, saveDialog.FileName, true);
m_Core.Config.AddRecentFile(m_Core.Config.RecentLogFiles, saveDialog.FileName, 10);
PopulateRecentFiles();
SetTitle(saveDialog.FileName);
}
catch (System.Exception ex)