Skip to content

Commit

Permalink
Possible Clipboard Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisFeline committed Jun 24, 2024
1 parent 2ab6a76 commit 4abdd30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Models/Entry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ public string GetTooltip(bool showPlayers, bool showTerrors)

public void CopyToClipboard()
{
Clipboard.SetText(Content);
Clipboard.SetDataObject(
Content, // Text to store in clipboard
false, // Do not keep after our application exits
4, // Retry 4 times
200);
// Clipboard.SetText(Content);
}
}
}
5 changes: 5 additions & 0 deletions Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,11 @@ private bool HandleSaveCode(string line, DateTime timestamp, LogContext context)
end -= index;

string save = line.Substring(index, end);
if (string.IsNullOrEmpty(save)) {
context.Set(SaveInitKey, false);
return false;
}

AddLogEntry(context.DateKey, save, timestamp, context);
context.Set(SaveInitKey, false);
return true;
Expand Down

0 comments on commit 4abdd30

Please sign in to comment.