libobs, UI: Implement item_locked event

Similar to item_visible, this event fires whenever a scene item is
locked or unlocked. This allows the UI and libobs to remain in sync
regarding scene elements' statuses.
This commit is contained in:
Chris Angelico
2019-05-24 21:34:41 +10:00
committed by jp9000
parent dd607b422f
commit 2fe641b8a4
5 changed files with 46 additions and 0 deletions

View File

@@ -94,6 +94,8 @@ VisibilityItemWidget::VisibilityItemWidget(obs_sceneitem_t *item_)
this);
signal_handler_connect(signal, "item_visible", OBSSceneItemVisible,
this);
signal_handler_connect(signal, "item_locked", OBSSceneItemLocked,
this);
connect(vis, SIGNAL(clicked(bool)),
this, SLOT(VisibilityClicked(bool)));
@@ -121,6 +123,8 @@ void VisibilityItemWidget::DisconnectItemSignals()
this);
signal_handler_disconnect(signal, "item_visible", OBSSceneItemVisible,
this);
signal_handler_disconnect(signal, "item_locked", OBSSceneItemLocked,
this);
sceneRemoved = true;
}