Skip to content

Commit

Permalink
Exporter now remembers text in clipboard and restores it if "Paste na…
Browse files Browse the repository at this point in the history
…mes from clipboard" option is used.
  • Loading branch information
Rynvar authored and Rynvar committed May 2, 2015
1 parent c058cd9 commit 35974cb
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 35974cb

Please sign in to comment.