From 0bd843f32494dab5429023076f28504acde57b4b Mon Sep 17 00:00:00 2001 From: zhupengfei Date: Thu, 28 Jun 2018 22:35:12 +0800 Subject: [PATCH] citra_qt: Fix image file selection dialog --- src/citra_qt/configuration/configure_camera.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/citra_qt/configuration/configure_camera.cpp b/src/citra_qt/configuration/configure_camera.cpp index e9d964b3a1..93c0888723 100644 --- a/src/citra_qt/configuration/configure_camera.cpp +++ b/src/citra_qt/configuration/configure_camera.cpp @@ -267,16 +267,12 @@ void ConfigureCamera::setConfiguration() { void ConfigureCamera::onToolButtonClicked() { stopPreviewing(); - int camera_selection = getSelectedCameraIndex(); - QString filter; - if (camera_name[camera_selection] == "image") { - QList types = QImageReader::supportedImageFormats(); - QList temp_filters; - for (const QByteArray& type : types) { - temp_filters << QString("*." + QString(type)); - } - filter = tr("Supported image files (%1)").arg(temp_filters.join(" ")); + QList types = QImageReader::supportedImageFormats(); + QList temp_filters; + for (const QByteArray& type : types) { + temp_filters << QString("*." + QString(type)); } + QString filter = tr("Supported image files (%1)").arg(temp_filters.join(" ")); QString path = QFileDialog::getOpenFileName(this, tr("Open File"), ".", filter); if (!path.isEmpty()) { ui->camera_file->setText(path);