Files from a Drop were only added but the fileslist never cleard

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-02-15 08:36:30 +00:00
parent 73d33f1ac6
commit e56aba8dd5
2 changed files with 16 additions and 2 deletions

View File

@@ -173,6 +173,7 @@ bool wxDropTarget::GetData()
{
UInt16 items ;
OSErr result;
bool firstFileAdded = false ;
CountDragItems((DragReference)m_currentDrag, &items);
for (UInt16 index = 1; index <= items; ++index)
{
@@ -215,7 +216,13 @@ bool wxDropTarget::GetData()
{
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
{