From: Vadim Zeitlin Date: Sat, 5 Nov 2011 11:23:48 +0000 (+0000) Subject: Use correct direction in wxDataObject::IsSupported() in wxOSX dnd code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b059c519bfd4830a8ca3dd58ca844ce623e6fcaa Use correct direction in wxDataObject::IsSupported() in wxOSX dnd code. Before calling wxDataObject::SetData() we must check whether the object supports this format using IsSupported(Set) instead of just IsSupported() which does the test in the "Get" direction. Closes #13615. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/dnd_osx.cpp b/src/osx/dnd_osx.cpp index 46c93cf148..351d2b4007 100644 --- a/src/osx/dnd_osx.cpp +++ b/src/osx/dnd_osx.cpp @@ -79,7 +79,7 @@ bool wxDropTarget::CurrentDragHasSupportedFormat() for (size_t i = 0; !supported && i < formatcount; i++) { wxDataFormat format = array[i]; - if ( m_dataObject->IsSupported( format ) ) + if ( m_dataObject->IsSupported( format, wxDataObject::Set ) ) { supported = true; break; @@ -119,7 +119,7 @@ bool wxDropTarget::GetData() for (size_t i = 0; !transferred && i < formatcount; i++) { wxDataFormat format = array[i]; - if ( m_dataObject->IsSupported( format ) ) + if ( m_dataObject->IsSupported( format, wxDataObject::Set ) ) { int size = data->GetDataSize( format ); transferred = true;