aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop-editor/dialog.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop-editor/dialog.cpp b/desktop-editor/dialog.cpp
index e3aad0d3..a8d9861d 100644
--- a/desktop-editor/dialog.cpp
+++ b/desktop-editor/dialog.cpp
@@ -94,10 +94,13 @@ void Dialog::LoadDesktopFile(QString input)
void Dialog::on_pbCommand_clicked()
{
- //TODO: detect Command directory
-
+ QString commandFolder="~";
+ if (!ui->lCommand->text().isEmpty()) {
+ commandFolder = ui->lCommand->text().section('/', 0, -2);
+ }
+
QString fileName = QFileDialog::getOpenFileName(this,
- tr("Open command"), "~", tr("All Files (*)"));
+ tr("Open command"), commandFolder, tr("All Files (*)"));
ui->lCommand->setText(fileName);
}
bgstack15