mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 16:36:31 +00:00
Handle duplicate contents being returned and dummy them. Refs #310
* Unfortunately too late for v0.30, but at least this will help anyone who upgrades v0.29 -> v0.31 or such.
This commit is contained in:
@@ -608,7 +608,7 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
for (int i = 0; i < contents.Length; i++)
|
||||
{
|
||||
IDockContent content = deserializeContent(contents[i].PersistString);
|
||||
if (content == null)
|
||||
if (content == null || dockPanel.Contents.IndexOf(content) >= 0)
|
||||
content = new DummyContent();
|
||||
content.DockHandler.DockPanel = dockPanel;
|
||||
content.DockHandler.AutoHidePortion = contents[i].AutoHidePortion;
|
||||
|
||||
@@ -519,6 +519,15 @@ namespace renderdocui.Windows
|
||||
// file is invalid
|
||||
return false;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Something went seriously wrong trying to load the window layout.\n" +
|
||||
"Trying to recover now, but you might have to delete the layout file in %APPDATA%/renderdoc.\n",
|
||||
"Error loading window layout",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user