From 8a0ab49f6ff4772e2cfff15f4545a9f8b9573726 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 6 Jun 2013 11:32:43 +0000
Subject: [PATCH] better preset of file name after first time

---
 Fltk/fileDialogs.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp
index 4b4643bf36..bd1943b9aa 100644
--- a/Fltk/fileDialogs.cpp
+++ b/Fltk/fileDialogs.cpp
@@ -128,7 +128,8 @@ int fileChooser(FILE_CHOOSER_TYPE type, const char *message,
     first = false;
   }
   else{
-    fc->preset_file(0);
+    std::string name = split[1] + split[2];
+    fc->preset_file(name.c_str());
   }
 
   int ret = 0;
@@ -172,7 +173,8 @@ int fileChooser(FILE_CHOOSER_TYPE type, const char *message,
     first = false;
   }
   else{
-    fc->value(0);
+    std::string name = split[1] + split[2];
+    fc->value(name.c_str());
   }
   fc->show();
   while(fc->shown()) Fl::wait();
-- 
GitLab