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
This commit is contained in:
Vadim Zeitlin 2011-11-05 11:23:48 +00:00
parent 041e6050fd
commit b059c519bf

View File

@ -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;