Use wxClipboard instead of obsolete functions in wxMetafile

Just call wxClipboard::SetData() instead of using obsolete functions for
working with clipboard.

This shouldn't result in any changes in behaviour.
This commit is contained in:
Vadim Zeitlin 2023-06-20 21:11:44 +01:00
parent 8a95a93a1d
commit bbbc85e52f

View file

@ -109,18 +109,7 @@ bool wxMetafile::SetClipboard(int width, int height)
if (!m_refData)
return false;
bool alreadyOpen = wxClipboardOpen();
if (!alreadyOpen)
{
wxOpenClipboard();
if (!wxEmptyClipboard())
return false;
}
bool success = wxSetClipboardData(wxDF_METAFILE, this, width,height);
if (!alreadyOpen)
wxCloseClipboard();
return success;
return wxTheClipboard->SetData(new wxMetafileDataObject(*this));
#endif
}