fix for single item wildcards with no explanatory name item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -144,12 +144,16 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
current += filter2.GetChar(i) ;
|
current += filter2.GetChar(i) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if ( filterIndex > 0 )
|
// we allow for compatibility reason to have a single filter expression (like *.*) without
|
||||||
{
|
// an explanatory text, in that case the first part is name and extension at the same time
|
||||||
wxASSERT_MSG( !isName , "incorrect format of format string" ) ;
|
|
||||||
myData->extensions[filterIndex] = current.MakeUpper() ;
|
wxASSERT_MSG( filterIndex == 0 || !isName , "incorrect format of format string" ) ;
|
||||||
++filterIndex ;
|
if ( current.IsEmpty() )
|
||||||
}
|
myData->extensions[filterIndex] = myData->name[filterIndex] ;
|
||||||
|
else
|
||||||
|
myData->extensions[filterIndex] = current.MakeUpper() ;
|
||||||
|
++filterIndex ;
|
||||||
|
|
||||||
|
|
||||||
myData->numfilters = filterIndex ;
|
myData->numfilters = filterIndex ;
|
||||||
for ( int i = 0 ; i < myData->numfilters ; i++ )
|
for ( int i = 0 ; i < myData->numfilters ; i++ )
|
||||||
|
@@ -144,12 +144,16 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
current += filter2.GetChar(i) ;
|
current += filter2.GetChar(i) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if ( filterIndex > 0 )
|
// we allow for compatibility reason to have a single filter expression (like *.*) without
|
||||||
{
|
// an explanatory text, in that case the first part is name and extension at the same time
|
||||||
wxASSERT_MSG( !isName , "incorrect format of format string" ) ;
|
|
||||||
myData->extensions[filterIndex] = current.MakeUpper() ;
|
wxASSERT_MSG( filterIndex == 0 || !isName , "incorrect format of format string" ) ;
|
||||||
++filterIndex ;
|
if ( current.IsEmpty() )
|
||||||
}
|
myData->extensions[filterIndex] = myData->name[filterIndex] ;
|
||||||
|
else
|
||||||
|
myData->extensions[filterIndex] = current.MakeUpper() ;
|
||||||
|
++filterIndex ;
|
||||||
|
|
||||||
|
|
||||||
myData->numfilters = filterIndex ;
|
myData->numfilters = filterIndex ;
|
||||||
for ( int i = 0 ; i < myData->numfilters ; i++ )
|
for ( int i = 0 ; i < myData->numfilters ; i++ )
|
||||||
|
Reference in New Issue
Block a user