mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-24 16:40:02 -04:00
UI: Ensure only one advanced audio settings window
Add a check to prevent that the advanced audio settings dialog is only once. When the dialog is already present raise it to the top instead.
This commit is contained in:
@@ -1651,9 +1651,17 @@ void OBSBasic::on_action_Settings_triggered()
|
||||
|
||||
void OBSBasic::on_actionAdvAudioProperties_triggered()
|
||||
{
|
||||
if (advAudioWindow != nullptr) {
|
||||
advAudioWindow->raise();
|
||||
return;
|
||||
}
|
||||
|
||||
advAudioWindow = new OBSBasicAdvAudio(this);
|
||||
advAudioWindow->show();
|
||||
advAudioWindow->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
connect(advAudioWindow, SIGNAL(destroyed()),
|
||||
this, SLOT(on_advAudioProps_destroyed()));
|
||||
}
|
||||
|
||||
void OBSBasic::on_advAudioProps_clicked()
|
||||
@@ -1661,6 +1669,11 @@ void OBSBasic::on_advAudioProps_clicked()
|
||||
on_actionAdvAudioProperties_triggered();
|
||||
}
|
||||
|
||||
void OBSBasic::on_advAudioProps_destroyed()
|
||||
{
|
||||
advAudioWindow = nullptr;
|
||||
}
|
||||
|
||||
void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
QListWidgetItem *prev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user