UI: Fix source remove log scene
This commit is contained in:
parent
3f1a868e05
commit
4251e32366
@ -205,10 +205,13 @@ void SourceTreeItem::ReconnectSignals()
|
|||||||
reinterpret_cast<SourceTreeItem *>(data);
|
reinterpret_cast<SourceTreeItem *>(data);
|
||||||
obs_sceneitem_t *curItem =
|
obs_sceneitem_t *curItem =
|
||||||
(obs_sceneitem_t *)calldata_ptr(cd, "item");
|
(obs_sceneitem_t *)calldata_ptr(cd, "item");
|
||||||
|
obs_scene_t *curScene =
|
||||||
|
(obs_scene_t *)calldata_ptr(cd, "scene");
|
||||||
|
|
||||||
if (curItem == this_->sceneitem) {
|
if (curItem == this_->sceneitem) {
|
||||||
QMetaObject::invokeMethod(this_->tree, "Remove",
|
QMetaObject::invokeMethod(this_->tree, "Remove",
|
||||||
Q_ARG(OBSSceneItem, curItem));
|
Q_ARG(OBSSceneItem, curItem),
|
||||||
|
Q_ARG(OBSScene, curScene));
|
||||||
curItem = nullptr;
|
curItem = nullptr;
|
||||||
}
|
}
|
||||||
if (!curItem)
|
if (!curItem)
|
||||||
@ -1617,14 +1620,13 @@ bool SourceTree::GroupedItemsSelected() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceTree::Remove(OBSSceneItem item)
|
void SourceTree::Remove(OBSSceneItem item, OBSScene scene)
|
||||||
{
|
{
|
||||||
OBSBasic *main = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
|
OBSBasic *main = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
|
||||||
GetStm()->Remove(item);
|
GetStm()->Remove(item);
|
||||||
main->SaveProject();
|
main->SaveProject();
|
||||||
|
|
||||||
if (!main->SavingDisabled()) {
|
if (!main->SavingDisabled()) {
|
||||||
obs_scene_t *scene = obs_sceneitem_get_scene(item);
|
|
||||||
obs_source_t *sceneSource = obs_scene_get_source(scene);
|
obs_source_t *sceneSource = obs_scene_get_source(scene);
|
||||||
obs_source_t *itemSource = obs_sceneitem_get_source(item);
|
obs_source_t *itemSource = obs_sceneitem_get_source(item);
|
||||||
blog(LOG_INFO, "User Removed source '%s' (%s) from scene '%s'",
|
blog(LOG_INFO, "User Removed source '%s' (%s) from scene '%s'",
|
||||||
|
@ -182,7 +182,7 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
inline void ReorderItems() { GetStm()->ReorderItems(); }
|
inline void ReorderItems() { GetStm()->ReorderItems(); }
|
||||||
inline void RefreshItems() { GetStm()->SceneChanged(); }
|
inline void RefreshItems() { GetStm()->SceneChanged(); }
|
||||||
void Remove(OBSSceneItem item);
|
void Remove(OBSSceneItem item, OBSScene scene);
|
||||||
void GroupSelectedItems();
|
void GroupSelectedItems();
|
||||||
void UngroupSelectedGroups();
|
void UngroupSelectedGroups();
|
||||||
void AddGroup();
|
void AddGroup();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user