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.setFileMode(QFileDialog::ExistingFile);
|
||||
dialog.setDirectory(m_lineEdit->text());
|
||||
dialog.exec();
|
||||
m_lineEdit->setText(dialog.selectedFiles().first());
|
||||
if (dialog.exec()) {
|
||||
m_lineEdit->setText(dialog.selectedFiles().first());
|
||||
}
|
||||
});
|
||||
addRow("", button);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue