UI: Handle (de)select scene items queued
The (de)select signal can come from a obs_scene_enum_items which locks the scene. The Qt::QueuedConnection makes sure the (de)select is handled outside of that lock. Fixes the deadlock from #3673
This commit is contained in:
parent
3a1af9cb8a
commit
d68484e7b7
@ -227,7 +227,8 @@ void SourceTreeItem::ReconnectSignals()
|
||||
(obs_sceneitem_t *)calldata_ptr(cd, "item");
|
||||
|
||||
if (curItem == this_->sceneitem)
|
||||
QMetaObject::invokeMethod(this_, "Select");
|
||||
QMetaObject::invokeMethod(this_, "Select",
|
||||
Qt::QueuedConnection);
|
||||
};
|
||||
|
||||
auto itemDeselect = [](void *data, calldata_t *cd) {
|
||||
@ -237,7 +238,8 @@ void SourceTreeItem::ReconnectSignals()
|
||||
(obs_sceneitem_t *)calldata_ptr(cd, "item");
|
||||
|
||||
if (curItem == this_->sceneitem)
|
||||
QMetaObject::invokeMethod(this_, "Deselect");
|
||||
QMetaObject::invokeMethod(this_, "Deselect",
|
||||
Qt::QueuedConnection);
|
||||
};
|
||||
|
||||
auto reorderGroup = [](void *data, calldata_t *) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user