Author: manolo
Date: 2011-09-05 09:52:16 -0700 (Mon, 05 Sep 2011)
New Revision: 9030
Log:
Keep filter attached to an Fl_Native-File_Chooser after it's closed.

Modified:
   branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm

Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm
===================================================================
--- branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm       2011-09-04 
13:50:31 UTC (rev 9029)
+++ branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm       2011-09-05 
16:52:16 UTC (rev 9030)
@@ -120,8 +120,6 @@
   // POST BROWSER
   int err = post();
 
-  _filt_total = 0;
-
   return(err);
 }
 
@@ -600,6 +598,7 @@
     }
     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;

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to