Correct query for formats supported by wxDataObject in wxGTK wxClipboard.
We wrongly asked wxDataObject for the formats it could provide on output instead of those it accepted as input in wxClipboard::GetData() in wxGTK. This could result in clipboard not working for "asymmetrical" data objects. See #11811. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -674,10 +674,11 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
{
|
||||
wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
|
||||
|
||||
// get all supported formats from wxDataObjects
|
||||
const size_t count = data.GetFormatCount();
|
||||
// get all supported formats from wxDataObjects: notice that we are setting
|
||||
// the object data, so we need them in "Set" direction
|
||||
const size_t count = data.GetFormatCount(wxDataObject::Set);
|
||||
wxDataFormatArray formats(new wxDataFormat[count]);
|
||||
data.GetAllFormats(formats.get());
|
||||
data.GetAllFormats(formats.get(), wxDataObject::Set);
|
||||
|
||||
for ( size_t i = 0; i < count; i++ )
|
||||
{
|
||||
|
Reference in New Issue
Block a user