mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
Add helper function to get specific scene item
This commit is contained in:
parent
26cf4688c2
commit
3f993e40df
@ -624,10 +624,14 @@ OBSScene OBSBasic::GetCurrentScene()
|
||||
return item ? item->data(Qt::UserRole).value<OBSScene>() : nullptr;
|
||||
}
|
||||
|
||||
OBSSceneItem OBSBasic::GetSceneItem(QListWidgetItem *item)
|
||||
{
|
||||
return item ? item->data(Qt::UserRole).value<OBSSceneItem>() : nullptr;
|
||||
}
|
||||
|
||||
OBSSceneItem OBSBasic::GetCurrentSceneItem()
|
||||
{
|
||||
QListWidgetItem *item = ui->sources->currentItem();
|
||||
return item ? item->data(Qt::UserRole).value<OBSSceneItem>() : nullptr;
|
||||
return GetSceneItem(ui->sources->currentItem());
|
||||
}
|
||||
|
||||
void OBSBasic::UpdateSources(OBSScene scene)
|
||||
|
@ -120,6 +120,7 @@ private:
|
||||
|
||||
void InitPrimitives();
|
||||
|
||||
OBSSceneItem GetSceneItem(QListWidgetItem *item);
|
||||
OBSSceneItem GetCurrentSceneItem();
|
||||
|
||||
bool QueryRemoveSource(obs_source_t source);
|
||||
|
Loading…
Reference in New Issue
Block a user