X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc42eb7afcb5c2c5da6178617e8a2b8c3a1a6c6e..399b60a0ad232265cd74ce8bf6a53a1f2cc57ff2:/src/msw/filedlg.cpp diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 0bc3273b38..b3f2a2999b 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -15,6 +15,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/msw/private.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -28,7 +29,7 @@ #include "wx/intl.h" #include "wx/log.h" - #include "wx/msw/private.h" +// #include "wx/msw/private.h" #endif #if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__) @@ -183,7 +184,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, m_fileName = defaultFileName; m_dir = defaultDir; m_wildCard = wildCard; - m_filterIndex = 1; + m_filterIndex = 0; } void wxFileDialog::GetPaths(wxArrayString& paths) const @@ -356,7 +357,7 @@ int wxFileDialog::ShowModal() m_filterIndex = (int)of.nFilterIndex - 1; - if ( of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.') ) + if ( !of.nFileExtension || (of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.')) ) { // user has typed an filename // without an extension: