Skip to content

Commit

Permalink
Enable audio to be played during config restart query
Browse files Browse the repository at this point in the history
The ConfigDialog::apply function also re-initializes
the audio input by stopping it at is beginning and
restarting it at the end. The modal restart query dialog
blocked this audio restart leaving the user with no
audio until the dialog was dismissed. This patch moves
the query until after the audio restart to resolve this.
  • Loading branch information
hacst committed Jun 19, 2015
1 parent 6db171e commit a1ff21b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/mumble/ConfigDialog.cpp
Expand Up @@ -216,15 +216,6 @@ void ConfigDialog::apply() {
foreach(ConfigWidget *cw, qmWidgets)
cw->accept();

if (g.s.requireRestartToApply && QMessageBox::question(
this,
tr("Restart Mumble?"),
tr("Some settings will only apply after a restart of Mumble. Restart Mumble now?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {

qApp->exit(MUMBLE_EXIT_CODE_RESTART);
}

if (!g.s.bAttenuateOthersOnTalk)
g.bAttenuateOthers = false;

Expand All @@ -233,6 +224,15 @@ void ConfigDialog::apply() {
g.s.bExpert = qcbExpert->isChecked();

Audio::start();

if (g.s.requireRestartToApply && QMessageBox::question(
this,
tr("Restart Mumble?"),
tr("Some settings will only apply after a restart of Mumble. Restart Mumble now?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {

qApp->exit(MUMBLE_EXIT_CODE_RESTART);
}
}

void ConfigDialog::accept() {
Expand Down

0 comments on commit a1ff21b

Please sign in to comment.