Made filter index zero-based

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2000-01-12 20:02:15 +00:00
parent 82ea63e6e0
commit cc42eb7afc

View File

@ -293,7 +293,7 @@ int wxFileDialog::ShowModal()
}
of.lpstrFilter = (LPTSTR)(const wxChar *)filterBuffer;
of.nFilterIndex = m_filterIndex;
of.nFilterIndex = m_filterIndex + 1;
//=== Setting defaultFileName >>=========================================
@ -354,7 +354,7 @@ int wxFileDialog::ShowModal()
//=== Adding the correct extension >>=================================
m_filterIndex = (int)of.nFilterIndex;
m_filterIndex = (int)of.nFilterIndex - 1;
if ( of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.') )
{ // user has typed an filename