From 3eec139b2efc8665af7291eb95501ccd96757c7b Mon Sep 17 00:00:00 2001 From: Ilya Melamed Date: Fri, 4 May 2018 15:33:35 -0700 Subject: [PATCH] UI: Use WaitConnection() when adding scenes Instead of queuing AddScene to add the new scene to the list box, ensures that the UI has added the new scene to the list box when the new scene is added. This ensures synchronization between the calling thread and the UI thread in this particular case. (Jim: Added detailed commit message description) Closes obsproject/obs-studio#1226 --- UI/window-basic-main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index e57dc40d9..b7860de19 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -2880,7 +2880,7 @@ void OBSBasic::SourceCreated(void *data, calldata_t *params) if (obs_scene_from_source(source) != NULL) QMetaObject::invokeMethod(static_cast(data), - "AddScene", + "AddScene", WaitConnection(), Q_ARG(OBSSource, OBSSource(source))); }