UI: Don't do scene check when removing scene items
The scene check prevents the ability to remove scene items that have been detached from their scene, which can happen when scenes are used as scene items and the scene is deleted elsewhere.
This commit is contained in:
parent
5fb9dcbaa7
commit
50d98dceac
1 changed files with 5 additions and 9 deletions
|
|
@ -1653,16 +1653,12 @@ void OBSBasic::AddSceneItem(OBSSceneItem item)
|
|||
|
||||
void OBSBasic::RemoveSceneItem(OBSSceneItem item)
|
||||
{
|
||||
obs_scene_t *scene = obs_sceneitem_get_scene(item);
|
||||
for (int i = 0; i < ui->sources->count(); i++) {
|
||||
QListWidgetItem *listItem = ui->sources->item(i);
|
||||
|
||||
if (GetCurrentScene() == scene) {
|
||||
for (int i = 0; i < ui->sources->count(); i++) {
|
||||
QListWidgetItem *listItem = ui->sources->item(i);
|
||||
|
||||
if (GetOBSRef<OBSSceneItem>(listItem) == item) {
|
||||
DeleteListItem(ui->sources, listItem);
|
||||
break;
|
||||
}
|
||||
if (GetOBSRef<OBSSceneItem>(listItem) == item) {
|
||||
DeleteListItem(ui->sources, listItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue