mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-28 02:31:54 +01:00
Merge pull request #3889 from zhaowenlan1779/camera-ui-fix
citra_qt: Fix image file selection dialog
This commit is contained in:
commit
3cf5c1a5b4
@ -267,16 +267,12 @@ void ConfigureCamera::setConfiguration() {
|
||||
|
||||
void ConfigureCamera::onToolButtonClicked() {
|
||||
stopPreviewing();
|
||||
int camera_selection = getSelectedCameraIndex();
|
||||
QString filter;
|
||||
if (camera_name[camera_selection] == "image") {
|
||||
QList<QByteArray> types = QImageReader::supportedImageFormats();
|
||||
QList<QString> temp_filters;
|
||||
for (const QByteArray& type : types) {
|
||||
temp_filters << QString("*." + QString(type));
|
||||
}
|
||||
filter = tr("Supported image files (%1)").arg(temp_filters.join(" "));
|
||||
QList<QByteArray> types = QImageReader::supportedImageFormats();
|
||||
QList<QString> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user