fixes for file drops in unicode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0c3d85e6ef
commit
ad05b1880e
@ -206,6 +206,9 @@ bool wxFileDataObject::SetData(
|
||||
{
|
||||
m_filenames.Empty();
|
||||
|
||||
// only add if this is not an empty string
|
||||
// we can therefore clear the list by just setting an empty string
|
||||
if ( (*(char*)pBuf) != 0 )
|
||||
AddFile(wxString::FromAscii((char*)pBuf));
|
||||
|
||||
return TRUE;
|
||||
|
@ -213,13 +213,13 @@ bool wxDropTarget::GetData()
|
||||
{
|
||||
HFSFlavor* theFile = (HFSFlavor*) theData ;
|
||||
wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec ) ;
|
||||
if ( firstFileAdded )
|
||||
((wxFileDataObject*)m_dataObject)->AddFile( name ) ;
|
||||
else
|
||||
if ( !firstFileAdded )
|
||||
{
|
||||
((wxFileDataObject*)m_dataObject)->SetData( 0 , name.c_str() ) ;
|
||||
// reset file list
|
||||
((wxFileDataObject*)m_dataObject)->SetData( 0 , "" ) ;
|
||||
firstFileAdded = true ;
|
||||
}
|
||||
((wxFileDataObject*)m_dataObject)->AddFile( name ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user