mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00: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:
parent
c45e74039f
commit
90ccae6f4c
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -234,6 +234,7 @@ private slots:
|
|||
void on_action_Settings_triggered();
|
||||
void on_actionAdvAudioProperties_triggered();
|
||||
void on_advAudioProps_clicked();
|
||||
void on_advAudioProps_destroyed();
|
||||
void on_actionShowLogs_triggered();
|
||||
void on_actionUploadCurrentLog_triggered();
|
||||
void on_actionUploadLastLog_triggered();
|
||||
|
|
Loading…
Reference in a new issue