{
UInt16 items ;
OSErr result;
+ bool firstFileAdded = false ;
CountDragItems((DragReference)m_currentDrag, &items);
for (UInt16 index = 1; index <= items; ++index)
{
{
HFSFlavor* theFile = (HFSFlavor*) theData ;
wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec ) ;
- ((wxFileDataObject*)m_dataObject)->AddFile( name ) ;
+ if ( firstFileAdded )
+ ((wxFileDataObject*)m_dataObject)->AddFile( name ) ;
+ else
+ {
+ ((wxFileDataObject*)m_dataObject)->SetData( 0 , name.c_str() ) ;
+ firstFileAdded = true ;
+ }
}
else
{
{
UInt16 items ;
OSErr result;
+ bool firstFileAdded = false ;
CountDragItems((DragReference)m_currentDrag, &items);
for (UInt16 index = 1; index <= items; ++index)
{
{
HFSFlavor* theFile = (HFSFlavor*) theData ;
wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec ) ;
- ((wxFileDataObject*)m_dataObject)->AddFile( name ) ;
+ if ( firstFileAdded )
+ ((wxFileDataObject*)m_dataObject)->AddFile( name ) ;
+ else
+ {
+ ((wxFileDataObject*)m_dataObject)->SetData( 0 , name.c_str() ) ;
+ firstFileAdded = true ;
+ }
}
else
{