From 7614ddbdbfcb0c0f7fbe806391b38acf1c495bf7 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 22 Aug 2016 16:16:31 +0000 Subject: [PATCH] prefill with model name *without* the extension --- Fltk/fileDialogs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp index 627493861c..a27c40be80 100644 --- a/Fltk/fileDialogs.cpp +++ b/Fltk/fileDialogs.cpp @@ -99,8 +99,10 @@ int fileChooser(FILE_CHOOSER_TYPE type, const char *message, std::string thepath; if(fname) thepath = std::string(fname); - else - thepath = GModel::current()->getFileName(); + else{ + std::vector<std::string> tmp = SplitFileName(GModel::current()->getFileName()); + thepath = tmp[0] + tmp[1]; // i.e., without the extension! + } std::vector<std::string> split = SplitFileName(thepath); if(split[0].empty()) thepath = std::string("./") + thepath; -- GitLab