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.
This commit is contained in:
tt2468 2021-09-13 02:58:15 -07:00 committed by Jim
parent 651f01cfef
commit 71d7b6855d

View File

@ -311,6 +311,7 @@ void SourceTreeItem::ReconnectSignals()
reinterpret_cast<SourceTreeItem *>(data);
this_->DisconnectSignals();
this_->sceneitem = nullptr;
QMetaObject::invokeMethod(this_->tree, "RefreshItems");
};
obs_source_t *source = obs_sceneitem_get_source(sceneitem);