Support GetFilterIndex() when filter choice is not shown in wxOSX

Platform native behaviour is not to show a filter, but to allow all
supported types to be selectable. Make sure GetFilterIndex still is a
valid choice (and not -1 as before).

Closes https://github.com/wxWidgets/wxWidgets/pull/1976
This commit is contained in:
Stefan Csomor
2020-07-17 10:36:46 +02:00
committed by Vadim Zeitlin
parent 113f4bb17d
commit 051152ff95
2 changed files with 46 additions and 41 deletions

View File

@@ -86,6 +86,7 @@ protected:
virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
void DoOnFilterSelected(int index);
virtual void OnFilterSelected(wxCommandEvent &event);
int GetMatchingFilterExtension(const wxString& filename);
wxArrayString m_filterExtensions;
wxArrayString m_filterNames;