mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Fix signals for sub-items of groups
Because sub-items of groups can no longer reroute their signals to the parent scenes of groups, delegates removal handling to SourceTreeItem instead of OBSBasic.
This commit is contained in:
@@ -2137,8 +2137,6 @@ void OBSBasic::AddScene(OBSSource source)
|
||||
container.handlers.assign({
|
||||
std::make_shared<OBSSignal>(handler, "item_add",
|
||||
OBSBasic::SceneItemAdded, this),
|
||||
std::make_shared<OBSSignal>(handler, "item_remove",
|
||||
OBSBasic::SceneItemRemoved, this),
|
||||
std::make_shared<OBSSignal>(handler, "item_select",
|
||||
OBSBasic::SceneItemSelected, this),
|
||||
std::make_shared<OBSSignal>(handler, "item_deselect",
|
||||
@@ -2236,23 +2234,6 @@ void OBSBasic::AddSceneItem(OBSSceneItem item)
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::RemoveSceneItem(OBSSceneItem item)
|
||||
{
|
||||
ui->sources->Remove(item);
|
||||
|
||||
SaveProject();
|
||||
|
||||
if (!disableSaving) {
|
||||
obs_scene_t *scene = obs_sceneitem_get_scene(item);
|
||||
obs_source_t *sceneSource = obs_scene_get_source(scene);
|
||||
obs_source_t *itemSource = obs_sceneitem_get_source(item);
|
||||
blog(LOG_INFO, "User Removed source '%s' (%s) from scene '%s'",
|
||||
obs_source_get_name(itemSource),
|
||||
obs_source_get_id(itemSource),
|
||||
obs_source_get_name(sceneSource));
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::UpdateSceneSelection(OBSSource source)
|
||||
{
|
||||
if (source) {
|
||||
@@ -2853,16 +2834,6 @@ void OBSBasic::SceneItemAdded(void *data, calldata_t *params)
|
||||
Q_ARG(OBSSceneItem, OBSSceneItem(item)));
|
||||
}
|
||||
|
||||
void OBSBasic::SceneItemRemoved(void *data, calldata_t *params)
|
||||
{
|
||||
OBSBasic *window = static_cast<OBSBasic*>(data);
|
||||
|
||||
obs_sceneitem_t *item = (obs_sceneitem_t*)calldata_ptr(params, "item");
|
||||
|
||||
QMetaObject::invokeMethod(window, "RemoveSceneItem",
|
||||
Q_ARG(OBSSceneItem, OBSSceneItem(item)));
|
||||
}
|
||||
|
||||
void OBSBasic::SceneItemSelected(void *data, calldata_t *params)
|
||||
{
|
||||
OBSBasic *window = static_cast<OBSBasic*>(data);
|
||||
|
||||
Reference in New Issue
Block a user