From 71d7b6855d8062171fd51a197fa99ac6444652c2 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Mon, 13 Sep 2021 02:58:15 -0700 Subject: [PATCH] UI: Refresh source tree when an item source is removed Previously, calling `obs_source_remove()` on an input would not fully remove it if there was a scene item of the input on the current scene. Now, when calling `obs_source_remove()` and there is a scene item of the removed input on the current scene, the UI refreshes the scene items, allowing the scene item to be released completely and the input destroyed. --- UI/source-tree.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/UI/source-tree.cpp b/UI/source-tree.cpp index 3d46582b3..c06a75b52 100644 --- a/UI/source-tree.cpp +++ b/UI/source-tree.cpp @@ -311,6 +311,7 @@ void SourceTreeItem::ReconnectSignals() reinterpret_cast(data); this_->DisconnectSignals(); this_->sceneitem = nullptr; + QMetaObject::invokeMethod(this_->tree, "RefreshItems"); }; obs_source_t *source = obs_sceneitem_get_source(sceneitem);