Compile fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,7 +185,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
m_fileName = defaultFileName;
|
||||
m_dir = defaultDir;
|
||||
m_wildCard = wildCard;
|
||||
m_filterIndex = 1;
|
||||
m_filterIndex = 0;
|
||||
}
|
||||
|
||||
int wxFileDialog::ShowModal(void)
|
||||
@@ -274,7 +274,7 @@ int wxFileDialog::ShowModal(void)
|
||||
}
|
||||
|
||||
of.lpstrFilter = (LPTSTR)(const wxChar *)filterBuffer;
|
||||
of.nFilterIndex = m_filterIndex;
|
||||
of.nFilterIndex = m_filterIndex + 1; // m_filterIndex is zero-based, but nFilterIndex is 1-based
|
||||
|
||||
//=== Setting defaultFileName >>=========================================
|
||||
|
||||
@@ -295,7 +295,7 @@ int wxFileDialog::ShowModal(void)
|
||||
|
||||
//=== Adding the correct extension >>=================================
|
||||
|
||||
m_filterIndex = (int)of.nFilterIndex;
|
||||
m_filterIndex = wxMax((int)of.nFilterIndex - 1, 0);
|
||||
|
||||
if ( of.nFileExtension && fileNameBuffer[ of.nFileExtension-1] != wxT('.') )
|
||||
{ // user has typed an filename
|
||||
|
Reference in New Issue
Block a user