Skip to content

Commit

Permalink
Fix wxFileDialog::GetFilterIndex() when opening files in wxOSX.
Browse files Browse the repository at this point in the history
Update m_filterIndex in the "opening" case, just as we already did in the
"saving" one (see #13158 and r67550).

Closes #16764.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
  • Loading branch information
vadz committed Jan 3, 2015
1 parent 4ae6049 commit ef5232d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/changes.txt
Expand Up @@ -601,6 +601,10 @@ wxMSW:
- Fix inserting tools removed from wxToolBar back into it (sbrowne).
- Fix disabling submenu items in the menus (Artur Wieczorek).

wxOSX:

- Fix wxFileDialog::GetFilterIndex() for file open dialogs (phsilva).


3.0.2: (released 2014-10-06)
----------------------------
Expand Down
6 changes: 6 additions & 0 deletions src/osx/cocoa/filedlg.mm
Expand Up @@ -679,6 +679,12 @@ - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
{
panel = oPanel;
result = wxID_OK;

if (m_filterChoice)
{
m_filterIndex = m_filterChoice->GetSelection();
}

NSArray* filenames = [oPanel filenames];
for ( size_t i = 0 ; i < [filenames count] ; ++ i )
{
Expand Down

0 comments on commit ef5232d

Please sign in to comment.