Add exception handling on Clipboard.SetText, fall back to SetDataObject

This commit is contained in:
baldurk
2015-07-06 18:15:49 +02:00
parent 069e2047ae
commit 6afbe8c92b
5 changed files with 100 additions and 11 deletions
+15 -1
View File
@@ -2293,7 +2293,21 @@ namespace renderdocui.Windows
if (e.KeyCode == Keys.C && e.Control)
{
Clipboard.SetText(texStatusDim.Text + " | " + statusLabel.Text);
try
{
Clipboard.SetText(texStatusDim.Text + " | " + statusLabel.Text);
}
catch (System.Exception)
{
try
{
Clipboard.SetDataObject(texStatusDim.Text + " | " + statusLabel.Text);
}
catch (System.Exception)
{
// give up!
}
}
}
if (!m_Core.LogLoaded) return;