From bbd65eb80378f24d2e60c0721c2dfa705f98a76a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 10 Nov 2011 11:49:02 +0000 Subject: [PATCH 1/1] 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 --- src/osx/carbon/clipbrd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.45.2