GH-2050 fix cancel button in file browse dialogs filling text fields

This commit is contained in:
Petr Mrázek
2017-12-03 19:21:04 +01:00
parent 95e6f37d39
commit 4bae6fe491
7 changed files with 19 additions and 22 deletions

View File

@ -206,12 +206,12 @@ void ExternalToolsPage::on_jsonEditorBrowseBtn_clicked()
? QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).first()
#endif
: ui->jsonEditorTextBox->text());
QString cooked_file = FS::NormalizePath(raw_file);
if (cooked_file.isEmpty())
if (raw_file.isEmpty())
{
return;
}
QString cooked_file = FS::NormalizePath(raw_file);
// it has to exist and be an executable
if (QFileInfo(cooked_file).exists() && QFileInfo(cooked_file).isExecutable())