mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-01 11:49:37 +00:00
citra_qt: Fix image file selection dialog
This commit is contained in:
parent
438751075f
commit
0bd843f324
1 changed files with 5 additions and 9 deletions
|
@ -267,16 +267,12 @@ void ConfigureCamera::setConfiguration() {
|
||||||
|
|
||||||
void ConfigureCamera::onToolButtonClicked() {
|
void ConfigureCamera::onToolButtonClicked() {
|
||||||
stopPreviewing();
|
stopPreviewing();
|
||||||
int camera_selection = getSelectedCameraIndex();
|
|
||||||
QString filter;
|
|
||||||
if (camera_name[camera_selection] == "image") {
|
|
||||||
QList<QByteArray> types = QImageReader::supportedImageFormats();
|
QList<QByteArray> types = QImageReader::supportedImageFormats();
|
||||||
QList<QString> temp_filters;
|
QList<QString> temp_filters;
|
||||||
for (const QByteArray& type : types) {
|
for (const QByteArray& type : types) {
|
||||||
temp_filters << QString("*." + QString(type));
|
temp_filters << QString("*." + QString(type));
|
||||||
}
|
}
|
||||||
filter = tr("Supported image files (%1)").arg(temp_filters.join(" "));
|
QString filter = tr("Supported image files (%1)").arg(temp_filters.join(" "));
|
||||||
}
|
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Open File"), ".", filter);
|
QString path = QFileDialog::getOpenFileName(this, tr("Open File"), ".", filter);
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
ui->camera_file->setText(path);
|
ui->camera_file->setText(path);
|
||||||
|
|
Loading…
Reference in a new issue