From: Vadim Zeitlin Date: Thu, 10 Nov 2011 11:49:02 +0000 (+0000) Subject: Correct the direction passed to wxDataObject in wxOSX clipboard code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bbd65eb80378f24d2e60c0721c2dfa705f98a76a?hp=60372b0d54379701d62edf5595a7dc25c48330e1 Correct the direction passed to wxDataObject in wxOSX clipboard code. Query for formats that wxDataObject supports on input, not output, in wxClipboard::GetData(). This is similar to r69454 For wxGTK. Closes #13649. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/clipbrd.cpp b/src/osx/carbon/clipbrd.cpp index 293173c9ec..5024215e12 100644 --- a/src/osx/carbon/clipbrd.cpp +++ b/src/osx/carbon/clipbrd.cpp @@ -157,10 +157,10 @@ bool wxClipboard::GetData( wxDataObject& data ) wxCHECK_MSG( m_open, false, wxT("clipboard not open") ); - size_t formatcount = data.GetFormatCount() + 1; + size_t formatcount = data.GetFormatCount(wxDataObject::Set) + 1; wxDataFormat *array = new wxDataFormat[ formatcount ]; - array[0] = data.GetPreferredFormat(); - data.GetAllFormats( &array[1] ); + array[0] = data.GetPreferredFormat(wxDataObject::Set); + data.GetAllFormats( &array[1], wxDataObject::Set ); bool transferred = false;