correcting Drag Data handling for 'TEXT' and 'utxt'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -315,13 +315,18 @@ wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
|
||||
Ptr dataPtr = new char[dataSize] ;
|
||||
m_data->GetDataHere( formats[i] , dataPtr ) ;
|
||||
OSType type = formats[i].GetFormatId() ;
|
||||
if ( type == 'TEXT' )
|
||||
if ( type == 'TEXT' || type == 'utxt' )
|
||||
{
|
||||
dataSize-- ;
|
||||
if ( dataSize > 0 )
|
||||
dataSize-- ;
|
||||
dataPtr[ dataSize ] = 0 ;
|
||||
wxString st( (wxChar*) dataPtr ) ;
|
||||
wxCharBuffer buf = st.mb_str( wxConvLocal) ;
|
||||
AddDragItemFlavor(theDrag, theItem, type , buf.data(), strlen(buf), 0);
|
||||
if ( type == 'utxt' )
|
||||
{
|
||||
if ( dataSize > 0 )
|
||||
dataSize-- ;
|
||||
dataPtr[ dataSize ] = 0 ;
|
||||
}
|
||||
AddDragItemFlavor(theDrag, theItem, type , dataPtr, dataSize, 0);
|
||||
}
|
||||
else if (type == kDragFlavorTypeHFS )
|
||||
{
|
||||
|
Reference in New Issue
Block a user