mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
UI: Fix audio restart message not hiding
This commit is contained in:
parent
861ebff4c9
commit
f32082920e
@ -761,6 +761,9 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
UpdateAutomaticReplayBufferCheckboxes();
|
||||
|
||||
App()->DisableHotkeys();
|
||||
|
||||
channelIndex = ui->channelSetup->currentIndex();
|
||||
sampleRateIndex = ui->sampleRate->currentIndex();
|
||||
}
|
||||
|
||||
OBSBasicSettings::~OBSBasicSettings()
|
||||
@ -3828,10 +3831,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,6 +117,8 @@ private:
|
||||
bool loading = true;
|
||||
bool forceAuthReload = false;
|
||||
std::string savedTheme;
|
||||
int sampleRateIndex = 0;
|
||||
int channelIndex = 0;
|
||||
|
||||
int lastSimpleRecQualityIdx = 0;
|
||||
int lastChannelSetupIdx = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user