Merge pull request #2312 from cg2121/fix-audio-message
UI: Fix audio restart message not hiding
This commit is contained in:
commit
c6053c3d96
2 changed files with 21 additions and 4 deletions
|
|
@ -763,6 +763,9 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
|||
on_baseResolution_editTextChanged(ui->baseResolution->currentText());
|
||||
|
||||
App()->DisableHotkeys();
|
||||
|
||||
channelIndex = ui->channelSetup->currentIndex();
|
||||
sampleRateIndex = ui->sampleRate->currentIndex();
|
||||
}
|
||||
|
||||
OBSBasicSettings::~OBSBasicSettings()
|
||||
|
|
@ -3867,10 +3870,22 @@ void OBSBasicSettings::AudioChanged()
|
|||
void OBSBasicSettings::AudioChangedRestart()
|
||||
{
|
||||
if (!loading) {
|
||||
audioChanged = true;
|
||||
ui->audioMsg->setText(QTStr("Basic.Settings.ProgramRestart"));
|
||||
sender()->setProperty("changed", QVariant(true));
|
||||
EnableApplyButton(true);
|
||||
int currentChannelIndex = ui->channelSetup->currentIndex();
|
||||
int currentSampleRateIndex = ui->sampleRate->currentIndex();
|
||||
|
||||
if (currentChannelIndex != channelIndex ||
|
||||
currentSampleRateIndex != sampleRateIndex) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue