Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example: https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user. The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
This commit is contained in:
committed by
Jon Evans
parent
1c6c0bf8cf
commit
9aedeae5c3
@@ -683,6 +683,8 @@ void BM2CMP_FRAME::OnExportToClipboard( wxCommandEvent& event )
|
||||
std::string buffer;
|
||||
ExportToBuffer( buffer, format );
|
||||
|
||||
wxLogNull doNotLog; // disable logging of failed clipboard actions
|
||||
|
||||
// Write buffer to the clipboard
|
||||
if (wxTheClipboard->Open())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user