Просмотр исходного кода

configure_ui: don't use an empty string

If the user had cancelled, it would clear the text box. That behavior was sanitized underneath, but may anyways cause inconveniences.
lat9nq 6 лет назад
Родитель
Сommit
19250aadee
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/yuzu/configuration/configure_ui.cpp

+ 3 - 1
src/yuzu/configuration/configure_ui.cpp

@@ -63,7 +63,9 @@ ConfigureUi::ConfigureUi(QWidget* parent) : QWidget(parent), ui(new Ui::Configur
         const QString& filename = QFileDialog::getExistingDirectory(
         const QString& filename = QFileDialog::getExistingDirectory(
             this, tr("Select Screenshots Path..."),
             this, tr("Select Screenshots Path..."),
             QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir)));
             QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir)));
-        ui->screenshot_path_edit->setText(filename);
+        if (!filename.isEmpty()) {
+            ui->screenshot_path_edit->setText(filename);
+        }
     });
     });
 }
 }