Skip to content

Commit

Permalink
Merge pull request HearthSim#930 from Rynvar/master
Browse files Browse the repository at this point in the history
Exporter now remembers text in clipboard and restores it if "Paste names from clipboard" option is used.
  • Loading branch information
Epix committed May 3, 2015
2 parents a2d6ea0 + 35974cb commit 1b359c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Hearthstone Deck Tracker/DeckExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ public static async Task Export(Deck deck)
{
if(deck == null)
return;
string Current_Clipboard = "";

try
{
if (Config.Instance.ExportPasteClipboard && Clipboard.ContainsText())
Current_Clipboard = Clipboard.GetText();
Logger.WriteLine(string.Format("Exporting " + deck.GetDeckInfo()), "DeckExporter");
var hsHandle = User32.GetHearthstoneWindow();

Expand Down Expand Up @@ -100,6 +104,8 @@ public static async Task Export(Deck deck)
{
Helper.MainWindow.Overlay.ForceHidden = false;
Helper.MainWindow.Overlay.UpdatePosition();
if (Config.Instance.ExportPasteClipboard && Current_Clipboard != "")
Clipboard.SetText(Current_Clipboard);
}
}

Expand Down

0 comments on commit 1b359c4

Please sign in to comment.