Browse Source

libobs: Add default hotkey id to duplicated item

Fixes https://obsproject.com/mantis/view.php?id=508

The toggle_visibility set only by init_hotkeys() call, but used each
time in obs_sceneitem_destroy() call.  Because zero hotkey_pair_id is
valid - we need to set item property other than zero here.

Closes jp9000/obs-studio#1000
SuslikV 8 years ago
parent
commit
650495331d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      libobs/obs-scene.c

+ 3 - 0
libobs/obs-scene.c

@@ -1119,6 +1119,9 @@ obs_scene_t *obs_scene_duplicate(obs_scene_t *scene, const char *name,
 			new_item->bounds_align = item->bounds_align;
 			new_item->bounds = item->bounds;
 
+			new_item->toggle_visibility =
+					OBS_INVALID_HOTKEY_PAIR_ID;
+
 			obs_sceneitem_set_crop(new_item, &item->crop);
 
 			if (!new_item->item_render &&