From cc42eb7afcb5c2c5da6178617e8a2b8c3a1a6c6e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 12 Jan 2000 20:02:15 +0000 Subject: [PATCH] Made filter index zero-based git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/filedlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 7ec54aecf3..0bc3273b38 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -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 -- 2.45.2