Ensure clipboard data is available after KiCad closes

Always Flush() after SetData()
This commit is contained in:
Roberto Fernandez Bautista
2021-05-03 19:38:31 +01:00
parent 5822cd85c4
commit ae009e0758
9 changed files with 10 additions and 0 deletions
+2
View File
@@ -980,6 +980,8 @@ bool TOOL_MANAGER::SaveClipboard( const std::string& aTextUTF8 )
// Store the UTF8 string as unicode string in clipboard:
wxTheClipboard->SetData( new wxTextDataObject( wxString( aTextUTF8.c_str(),
wxConvUTF8 ) ) );
wxTheClipboard->Flush(); // Allow data to be available after closing KiCad
wxTheClipboard->Close();
return true;