diff --git a/interface/wx/filedlg.h b/interface/wx/filedlg.h index 3be2c15429..cd53f73e22 100644 --- a/interface/wx/filedlg.h +++ b/interface/wx/filedlg.h @@ -236,10 +236,11 @@ public: control to update its state depending on the currently selected file type filter. - Currently this function is fully implemented only under MSW and + Currently this function is fully implemented under macOS and MSW and always returns @c wxNOT_FOUND elsewhere. - @since 3.1.3 + @since 3.1.3 - MSW + @since 3.1.5 - macOS @return The 0-based index of the currently selected file type filter or wxNOT_FOUND if nothing is selected. diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index dabb77f4a8..3a5fecae72 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -295,6 +295,10 @@ void wxFileDialog::DoOnFilterSelected(int index) NSArray* types = GetTypesFromExtension(m_filterExtensions[index],m_currentExtensions); NSSavePanel* panel = (NSSavePanel*) GetWXWindow(); [panel setAllowedFileTypes:types]; + + m_currentlySelectedFilterIndex = index; + + UpdateExtraControlUI(); } // An item has been selected in the file filter wxChoice: