Skip to content

Commit

Permalink
libobs: Deselect scene item before removing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gxalpha authored and RytoEX committed Sep 16, 2024
1 parent 61d74fb commit 16b8e9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libobs/obs-scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 16b8e9c

Please sign in to comment.