From 03a94aee41245a4c064c7cd8d786ded04a59af41 Mon Sep 17 00:00:00 2001 From: cg2121 Date: Sat, 4 Mar 2023 06:07:41 -0600 Subject: [PATCH] UI: Fix wrong program scene if tbar is aborted The program scene would be incorrect if the tbar was released at its original position. --- UI/window-basic-main-transitions.cpp | 3 +-- UI/window-basic-main.hpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/window-basic-main-transitions.cpp b/UI/window-basic-main-transitions.cpp index 89091a61b..983bbc088 100644 --- a/UI/window-basic-main-transitions.cpp +++ b/UI/window-basic-main-transitions.cpp @@ -309,8 +309,6 @@ void OBSBasic::TransitionToScene(OBSSource source, bool force, if (!scene) return; - OBSWeakSource lastProgramScene; - if (usingPreviewProgram) { if (!tBarActive) lastProgramScene = programScene; @@ -906,6 +904,7 @@ void OBSBasic::TBarReleased() tBar->blockSignals(false); tBarActive = false; EnableTransitionWidgets(true); + programScene = lastProgramScene; } tBar->clearFocus(); diff --git a/UI/window-basic-main.hpp b/UI/window-basic-main.hpp index 5b96acf62..31e01bb3e 100644 --- a/UI/window-basic-main.hpp +++ b/UI/window-basic-main.hpp @@ -497,6 +497,7 @@ private: OBSWeakSource lastScene; OBSWeakSource swapScene; OBSWeakSource programScene; + OBSWeakSource lastProgramScene; bool editPropertiesMode = false; bool sceneDuplicationMode = true; bool swapScenesMode = true;