Skip to content

Commit

Permalink
Merge branch 'main' into abstractions-project
Browse files Browse the repository at this point in the history
  • Loading branch information
MattEqualsCoder authored Oct 25, 2023
2 parents 6b8afff + 528a6e1 commit 59b7ec2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Randomizer.App/Controls/RomListPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public abstract class RomListPanel : UserControl
private TrackerWindow? _trackerWindow;
private RomLauncherService _romLauncherService;


public RomListPanel(IServiceProvider serviceProvider,
OptionsFactory optionsFactory,
ILogger<RomListPanel> logger,
Expand Down Expand Up @@ -198,7 +197,15 @@ public void CopyTextToClipboard(string text)
}
catch (System.Runtime.InteropServices.COMException)
{
Clipboard.SetDataObject(text);
try
{
Clipboard.Clear();
Clipboard.SetDataObject(text);
}
catch (Exception e)
{
Logger.LogError(e, "Unable to copy to clipboard");
}
}
}

Expand Down

0 comments on commit 59b7ec2

Please sign in to comment.