UI: Cleanup on_scenes_currentItemChanged function
Removed unnecessary lines from the function. Also if the source happened to be null, the SetCurrentScene function would be called anyway. Finally, the UpdateContextBar and api lines were removed, as they are also being called with SetCurrentScene.
This commit is contained in:
parent
387a2c5f3e
commit
c497342fd6
1 changed files with 2 additions and 13 deletions
|
|
@ -4694,22 +4694,11 @@ void OBSBasic::AdvAudioPropsDestroyed()
|
|||
void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
QListWidgetItem *prev)
|
||||
{
|
||||
obs_source_t *source = NULL;
|
||||
|
||||
if (current) {
|
||||
obs_scene_t *scene;
|
||||
|
||||
scene = GetOBSRef<OBSScene>(current);
|
||||
source = obs_scene_get_source(scene);
|
||||
OBSScene scene = GetOBSRef<OBSScene>(current);
|
||||
SetCurrentScene(scene);
|
||||
}
|
||||
|
||||
SetCurrentScene(source);
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED);
|
||||
|
||||
UpdateContextBar();
|
||||
|
||||
UNUSED_PARAMETER(prev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue