|
@@ -2769,8 +2769,7 @@ OBSSource OBSBasic::GetProgramSource()
|
|
|
|
|
|
OBSScene OBSBasic::GetCurrentScene()
|
|
|
{
|
|
|
- QListWidgetItem *item = ui->scenes->currentItem();
|
|
|
- return item ? GetOBSRef<OBSScene>(item) : nullptr;
|
|
|
+ return currentScene.load();
|
|
|
}
|
|
|
|
|
|
OBSSceneItem OBSBasic::GetSceneItem(QListWidgetItem *item)
|
|
@@ -3960,6 +3959,7 @@ void OBSBasic::RemoveSelectedScene()
|
|
|
QListWidgetItem *item = ui->scenes->takeItem(curIndex);
|
|
|
ui->scenes->insertItem(savedIndex, item);
|
|
|
ui->scenes->setCurrentRow(savedIndex);
|
|
|
+ currentScene = scene.Get();
|
|
|
ui->scenes->blockSignals(false);
|
|
|
};
|
|
|
|
|
@@ -4964,6 +4964,10 @@ void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
|
|
|
|
|
|
scene = GetOBSRef<OBSScene>(current);
|
|
|
source = obs_scene_get_source(scene);
|
|
|
+
|
|
|
+ currentScene = scene;
|
|
|
+ } else {
|
|
|
+ currentScene = NULL;
|
|
|
}
|
|
|
|
|
|
SetCurrentScene(source);
|
|
@@ -5227,6 +5231,7 @@ void OBSBasic::ChangeSceneIndex(bool relative, int offset, int invalidIdx)
|
|
|
ui->scenes->insertItem(idx + offset, item);
|
|
|
ui->scenes->setCurrentRow(idx + offset);
|
|
|
item->setSelected(true);
|
|
|
+ currentScene = GetOBSRef<OBSScene>(item).Get();
|
|
|
ui->scenes->blockSignals(false);
|
|
|
|
|
|
OBSProjector::UpdateMultiviewProjectors();
|