From 2b69adf3bcdb195df5373fd31af217157efde001 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 4 Jun 2021 20:40:42 -0700 Subject: [PATCH] Revert "UI: Cleanup on_scenes_currentItemChanged function" This reverts commit c497342fd695b980300a80fedec6c4cac155aa87. Fixes a bug where the sources list would not update after 5b25dec714e4. --- UI/window-basic-main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 13d6dc3e5..0f4c70a46 100644 --- a/UI/window-basic-main.cpp +++ b/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(current); - SetCurrentScene(scene); + obs_scene_t *scene; + + scene = GetOBSRef(current); + source = obs_scene_get_source(scene); } + SetCurrentScene(source); + + if (api) + api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED); + + UpdateContextBar(); + UNUSED_PARAMETER(prev); }