]> git.saurik.com Git - wxWidgets.git/commitdiff
Use correct direction in wxDataObject::IsSupported() in wxOSX dnd code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Nov 2011 11:23:48 +0000 (11:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Nov 2011 11:23:48 +0000 (11:23 +0000)
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

src/osx/dnd_osx.cpp

index 46c93cf14811681824f69f5a73cae756272e3e34..351d2b4007bedcf15cf91059b6d1edfad0666539 100644 (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;