diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-12-03 19:21:04 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-12-03 19:21:04 +0100 |
commit | 4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f (patch) | |
tree | 2da09958eae5379e8ecb2bd20c8a17e57f5ddf3b /application/dialogs | |
parent | 95e6f37d3942d4ab681e2f2484f17bbf8489c332 (diff) | |
download | MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar.gz MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar.lz MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar.xz MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.zip |
GH-2050 fix cancel button in file browse dialogs filling text fields
Diffstat (limited to 'application/dialogs')
-rw-r--r-- | application/dialogs/ExportInstanceDialog.cpp | 2 | ||||
-rw-r--r-- | application/dialogs/SkinUploadDialog.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/application/dialogs/ExportInstanceDialog.cpp b/application/dialogs/ExportInstanceDialog.cpp index caa15c48..7f3fd937 100644 --- a/application/dialogs/ExportInstanceDialog.cpp +++ b/application/dialogs/ExportInstanceDialog.cpp @@ -388,7 +388,7 @@ bool ExportInstanceDialog::doExport() const QString output = QFileDialog::getSaveFileName( this, tr("Export %1").arg(m_instance->name()), FS::PathCombine(QDir::homePath(), name + ".zip"), "Zip (*.zip)", nullptr, QFileDialog::DontConfirmOverwrite); - if (output.isNull()) + if (output.isEmpty()) { return false; } diff --git a/application/dialogs/SkinUploadDialog.cpp b/application/dialogs/SkinUploadDialog.cpp index ebbab785..287aaf7e 100644 --- a/application/dialogs/SkinUploadDialog.cpp +++ b/application/dialogs/SkinUploadDialog.cpp @@ -54,11 +54,11 @@ void SkinUploadDialog::on_buttonBox_accepted() void SkinUploadDialog::on_skinBrowseBtn_clicked() { QString raw_path = QFileDialog::getOpenFileName(this, tr("Select Skin Texture"), QString(), "*.png"); - QString cooked_path = FS::NormalizePath(raw_path); - if (cooked_path.isEmpty() || !QFileInfo::exists(cooked_path)) + if (raw_path.isEmpty() || !QFileInfo::exists(raw_path)) { return; } + QString cooked_path = FS::NormalizePath(raw_path); ui->skinPathTextBox->setText(cooked_path); } |