(CopyNamesExec): ignore clipboard errors.

This commit is contained in:
morkt 2017-01-05 02:01:51 +04:00
parent 2f4d258694
commit 152af64a9e

View File

@ -1198,9 +1198,16 @@ namespace GARbro.GUI
{ {
var names = CurrentDirectory.SelectedItems.Cast<EntryViewModel>().Select (f => f.Name); var names = CurrentDirectory.SelectedItems.Cast<EntryViewModel>().Select (f => f.Name);
if (names.Any()) if (names.Any())
{
try
{ {
Clipboard.SetText (string.Join ("\r\n", names)); Clipboard.SetText (string.Join ("\r\n", names));
} }
catch (Exception X)
{
Trace.WriteLine (X.Message, "Clipboard error");
}
}
} }
void NextItemExec (object sender, ExecutedRoutedEventArgs e) void NextItemExec (object sender, ExecutedRoutedEventArgs e)