mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-25 22:58:29 -05:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user