浏览代码

UI: Stop locking filter mutex while loading properties

Reordering the filters makes the filter mutex of the source locked
while loading a new the properties of a filter which may require other
locks. By loading the properties of the filter on a QueuedConnection
we make sure the filter mutex is cleared when that happens.
Exeldro 3 年之前
父节点
当前提交
ae4797f8cc
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      UI/properties-view.cpp

+ 4 - 2
UI/properties-view.cpp

@@ -188,7 +188,8 @@ OBSPropertiesView::OBSPropertiesView(OBSData settings_, void *obj_,
 	  minSize(minSize_)
 {
 	setFrameShape(QFrame::NoFrame);
-	ReloadProperties();
+	QMetaObject::invokeMethod(this, "ReloadProperties",
+				  Qt::QueuedConnection);
 }
 
 OBSPropertiesView::OBSPropertiesView(OBSData settings_, const char *type_,
@@ -202,7 +203,8 @@ OBSPropertiesView::OBSPropertiesView(OBSData settings_, const char *type_,
 	  minSize(minSize_)
 {
 	setFrameShape(QFrame::NoFrame);
-	ReloadProperties();
+	QMetaObject::invokeMethod(this, "ReloadProperties",
+				  Qt::QueuedConnection);
 }
 
 void OBSPropertiesView::resizeEvent(QResizeEvent *event)