changeset 18405:187f3a3429e1 gui-release

GUI: Use selected/entered name as part of the directory name in uigetdir * libgui/src/dialog.cc (FileDialog::accept): If in directory mode and a name was selected/input, add it to path name.
author John Donoghue <john.donoghue@ieee.org>
date Tue, 28 Jan 2014 18:19:39 -0500
parents 6ebd37faae5f
children a9cec5517d92
files libgui/src/dialog.cc
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/dialog.cc	Tue Jan 28 18:17:57 2014 -0500
+++ b/libgui/src/dialog.cc	Tue Jan 28 18:19:39 2014 -0500
@@ -496,6 +496,12 @@
   // if not showing only dirs, add end slash for the path component
   if (testOption (QFileDialog::ShowDirsOnly)  == false)
     path = path + "/";
+  else
+    {
+      // if name was provided in uigetdir, add to path
+      if (string_result.size() > 0)
+        path = path + "/" + string_result[0];
+    }
 
   // convert to native slashes
   path = QDir::toNativeSeparators (path);