Explorar o código

Revert "UI: Cleanup on_scenes_currentItemChanged function"

This reverts commit c497342fd695b980300a80fedec6c4cac155aa87.

Fixes a bug where the sources list would not update after 5b25dec714e4.
jp9000 %!s(int64=4) %!d(string=hai) anos
pai
achega
2b69adf3bc
Modificáronse 1 ficheiros con 13 adicións e 2 borrados
  1. 13 2
      UI/window-basic-main.cpp

+ 13 - 2
UI/window-basic-main.cpp

@@ -4656,11 +4656,22 @@ void OBSBasic::AdvAudioPropsDestroyed()
 void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
 					    QListWidgetItem *prev)
 {
+	obs_source_t *source = NULL;
+
 	if (current) {
-		OBSScene scene = GetOBSRef<OBSScene>(current);
-		SetCurrentScene(scene);
+		obs_scene_t *scene;
+
+		scene = GetOBSRef<OBSScene>(current);
+		source = obs_scene_get_source(scene);
 	}
 
+	SetCurrentScene(source);
+
+	if (api)
+		api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED);
+
+	UpdateContextBar();
+
 	UNUSED_PARAMETER(prev);
 }