Просмотр исходного кода

frontend: Properly update studio mode mixer

Penwywern 2 дней назад
Родитель
Сommit
71de30f2a9
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      frontend/widgets/AudioMixer.cpp

+ 4 - 0
frontend/widgets/AudioMixer.cpp

@@ -380,12 +380,14 @@ void AudioMixer::updateControlVisibility(QString uuid)
 void AudioMixer::sourceCreated(QString uuid)
 void AudioMixer::sourceCreated(QString uuid)
 {
 {
 	addControlForUuid(uuid);
 	addControlForUuid(uuid);
+	updatePreviewSources();
 	updateGlobalSources();
 	updateGlobalSources();
 }
 }
 
 
 void AudioMixer::sourceRemoved(QString uuid)
 void AudioMixer::sourceRemoved(QString uuid)
 {
 {
 	removeControlForUuid(uuid);
 	removeControlForUuid(uuid);
+	updatePreviewSources();
 	updateGlobalSources();
 	updateGlobalSources();
 }
 }
 
 
@@ -871,6 +873,8 @@ void AudioMixer::handleFrontendEvent(obs_frontend_event event)
 {
 {
 	switch (event) {
 	switch (event) {
 	case OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED:
 	case OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED:
+	case OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED:
+	case OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED:
 		updatePreviewSources();
 		updatePreviewSources();
 		queueLayoutUpdate();
 		queueLayoutUpdate();
 		break;
 		break;