浏览代码

libobs: Deselect scene item before removing

Makes sure that a scene item that gets removed is in the "not selected"
state, no matter whether it was selected before. This causes the
"item_deselect" signal to be sent if the item is selected while being
removed.
gxalpha 1 年之前
父节点
当前提交
16b8e9c3fe
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      libobs/obs-scene.c

+ 1 - 0
libobs/obs-scene.c

@@ -2668,6 +2668,7 @@ static void obs_sceneitem_remove_internal(obs_sceneitem_t *item)
 	obs_scene_t *parent = item->parent;
 	item->removed = true;
 
+	obs_sceneitem_select(item, false);
 	set_visibility(item, false);
 
 	detach_sceneitem(item);