]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed saving dialog's filter index always being -1 with wxOSX-Cocoa.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 20 Apr 2011 07:53:07 +0000 (07:53 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 20 Apr 2011 07:53:07 +0000 (07:53 +0000)
This problem was reproducable using the Save file dialog in the dialogs sample.
The member m_filterIndex was only initialised to -1 and never set at another point. Set it to the filter's selection during ModalFinishedCallback.

Closes #13158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/filedlg.mm

index 2b42ed7b6c7c38feaa4fd5cae6f1b299af75740a..77da69425889a412cf91b790369bc8154b9a30c5 100644 (file)
@@ -592,6 +592,10 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode)
             m_path = wxCFStringRef::AsString([sPanel filename]);
             m_fileName = wxFileNameFromPath(m_path);
             m_dir = wxPathOnly( m_path );
+            if (m_filterChoice)
+            {
+                m_filterIndex = m_filterChoice->GetSelection();
+            }
         }
     }
     else