diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Native_File_Chooser_MAC.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index 4140dc2ec..c7e6e35ac 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -120,8 +120,6 @@ int Fl_Native_File_Chooser::show() { // POST BROWSER int err = post(); - _filt_total = 0; - return(err); } @@ -600,6 +598,7 @@ int Fl_Native_File_Chooser::post() { } if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory]; if (_filt_total) { + if (_filt_value >= _filt_total) _filt_value = _filt_total - 1; char *t = prepareMacFilter(_filt_total, _filter, _filt_patt); popup = createPopupAccessory((NSSavePanel*)_panel, t, [[(NSSavePanel*)_panel nameFieldLabel] UTF8String], _filt_value); delete[] t; |
