From: Dimitri Schoolwerth Date: Wed, 20 Apr 2011 07:53:07 +0000 (+0000) Subject: Fixed saving dialog's filter index always being -1 with wxOSX-Cocoa. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0d1cd87409608d690e17cfd1404e81b148ec4de5 Fixed saving dialog's filter index always being -1 with wxOSX-Cocoa. 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 --- diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index 2b42ed7b6c..77da694258 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -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