only change if dialog was accepted
This commit is contained in:
parent
d4ef70f6c4
commit
fa74937337
|
@ -35,8 +35,9 @@ SoundSettings::SoundSettings(SnorePlugin *snorePlugin, QWidget *parent) :
|
||||||
dialog.setNameFilter("All Audio files (*.mp3 *.wav *.ogg)");
|
dialog.setNameFilter("All Audio files (*.mp3 *.wav *.ogg)");
|
||||||
dialog.setFileMode(QFileDialog::ExistingFile);
|
dialog.setFileMode(QFileDialog::ExistingFile);
|
||||||
dialog.setDirectory(m_lineEdit->text());
|
dialog.setDirectory(m_lineEdit->text());
|
||||||
dialog.exec();
|
if (dialog.exec()) {
|
||||||
m_lineEdit->setText(dialog.selectedFiles().first());
|
m_lineEdit->setText(dialog.selectedFiles().first());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
addRow("", button);
|
addRow("", button);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue