From ebec42f190d915a90bb43d755bd6b87d5856657c Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 13 May 2002 23:15:40 +0000
Subject: [PATCH] 1.1 bug workaround

---
 Fltk/Callbacks.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 09e37b9009..5dea264986 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.121 2002-05-07 05:32:20 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.122 2002-05-13 23:15:40 geuzaine Exp $
 
 #include <sys/types.h>
 #include <signal.h>
@@ -58,8 +58,7 @@ static Fl_File_Chooser *fc = NULL;
 
 int file_chooser(int multi, const char* message, const char* pat){
   if (!fc) {
-    fc = new Fl_File_Chooser(".", pat, multi ? Fl_File_Chooser::MULTI : 
-			     Fl_File_Chooser::CREATE, message);
+    fc = new Fl_File_Chooser(".", pat, Fl_File_Chooser::CREATE, message);
   }
   else {
     if (fc->value() && 
@@ -73,10 +72,15 @@ int file_chooser(int multi, const char* message, const char* pat){
       else i = strlen(q);
       p[i] = 0;
     }
-    fc->type(multi ? Fl_File_Chooser::MULTI : Fl_File_Chooser::CREATE);
     fc->filter(pat);
     fc->label(message);
   }
+
+  if(multi)
+    fc->type(Fl_File_Chooser::MULTI);
+  else
+    fc->type(Fl_File_Chooser::CREATE);
+
   fc->show();
 
   while (fc->shown()) Fl::wait();
-- 
GitLab