mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Set the window title to the filename when saving a log
This commit is contained in:
@@ -595,13 +595,13 @@ namespace renderdocui.Windows
|
||||
LoadSaveLayout((ToolStripItem)sender, false);
|
||||
}
|
||||
|
||||
private void SetTitle()
|
||||
private void SetTitle(string filename)
|
||||
{
|
||||
string prefix = "";
|
||||
|
||||
if (m_Core != null && m_Core.LogLoaded)
|
||||
{
|
||||
prefix = Path.GetFileName(m_Core.LogFileName);
|
||||
prefix = Path.GetFileName(filename);
|
||||
if (m_Core.APIProps.degraded)
|
||||
prefix += " !DEGRADED PERFORMANCE!";
|
||||
if (m_RemoteReplay.Length > 0)
|
||||
@@ -618,6 +618,11 @@ namespace renderdocui.Windows
|
||||
Text += String.Format("Unofficial release ({0} - {1})", VersionString, GitCommitHash);
|
||||
}
|
||||
|
||||
private void SetTitle()
|
||||
{
|
||||
SetTitle(m_Core != null ? m_Core.LogFileName : "");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Capture & Log Loading
|
||||
@@ -1241,6 +1246,7 @@ 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);
|
||||
SetTitle(saveDialog.FileName);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user