UI: Fix changed state of audio settings
When changing audio channels, sample rate, or audio buffering settings
multiple times by hitting `Apply` button, the internal `changed` state
got corrupted. To avoid this, set the changed state when changed
something, but do not clear the changed state.
(cherry picked from commit 846cdafbed)
This commit is contained in:
parent
4e1e947095
commit
0b7ac96157
1 changed files with 4 additions and 6 deletions
|
|
@ -4643,17 +4643,15 @@ void OBSBasicSettings::AudioChangedRestart()
|
|||
if (currentChannelIndex != channelIndex ||
|
||||
currentSampleRateIndex != sampleRateIndex ||
|
||||
currentLLAudioBufVal != llBufferingEnabled) {
|
||||
audioChanged = true;
|
||||
ui->audioMsg->setText(
|
||||
QTStr("Basic.Settings.ProgramRestart"));
|
||||
sender()->setProperty("changed", QVariant(true));
|
||||
EnableApplyButton(true);
|
||||
} else {
|
||||
audioChanged = false;
|
||||
ui->audioMsg->setText("");
|
||||
sender()->setProperty("changed", QVariant(false));
|
||||
EnableApplyButton(false);
|
||||
}
|
||||
|
||||
audioChanged = true;
|
||||
sender()->setProperty("changed", QVariant(true));
|
||||
EnableApplyButton(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue