# HG changeset patch # User John Donoghue # Date 1390951179 18000 # Node ID 187f3a3429e16c6e7c347270d736212804b7a8d7 # Parent 6ebd37faae5f3d701f20acc3fc4d948c6a347f14 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. diff -r 6ebd37faae5f -r 187f3a3429e1 libgui/src/dialog.cc --- 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);