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:
parent
8a95a93a1d
commit
bbbc85e52f
1 changed files with 1 additions and 12 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue