bug #105 (wxFileSelector misinterprets the def extension) fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -118,7 +118,7 @@ wxString wxFileSelector(const wxChar *title,
|
|||||||
flags, wxPoint(x, y));
|
flags, wxPoint(x, y));
|
||||||
if( wxStrlen(defaultExtension) != 0 )
|
if( wxStrlen(defaultExtension) != 0 )
|
||||||
{
|
{
|
||||||
int filterFind = 1,
|
int filterFind = 0,
|
||||||
filterIndex = 0;
|
filterIndex = 0;
|
||||||
|
|
||||||
for( unsigned int i = 0; i < filter2.Len(); i++ )
|
for( unsigned int i = 0; i < filter2.Len(); i++ )
|
||||||
@@ -127,7 +127,6 @@ wxString wxFileSelector(const wxChar *title,
|
|||||||
{
|
{
|
||||||
// save the start index of the new filter
|
// save the start index of the new filter
|
||||||
unsigned int is = i++;
|
unsigned int is = i++;
|
||||||
filterIndex++;
|
|
||||||
|
|
||||||
// find the end of the filter
|
// find the end of the filter
|
||||||
for( ; i < filter2.Len(); i++ )
|
for( ; i < filter2.Len(); i++ )
|
||||||
@@ -139,12 +138,13 @@ wxString wxFileSelector(const wxChar *title,
|
|||||||
if( i-is-1 > 0 && is+1 < filter2.Len() )
|
if( i-is-1 > 0 && is+1 < filter2.Len() )
|
||||||
{
|
{
|
||||||
if( filter2.Mid(is+1,i-is-1).Contains(defaultExtension) )
|
if( filter2.Mid(is+1,i-is-1).Contains(defaultExtension) )
|
||||||
// if( filter2.Mid(is+1,i-is-1) == defaultExtension )
|
|
||||||
{
|
{
|
||||||
filterFind = filterIndex;
|
filterFind = filterIndex;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filterIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user