mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-19 19:55:16 -04:00
Merge pull request #1297 from Palakis/preview-scene-event-fix
UI: Fix OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED
This commit is contained in:
@@ -900,8 +900,10 @@ retryScene:
|
||||
|
||||
disableSaving--;
|
||||
|
||||
if (api)
|
||||
if (api) {
|
||||
api->on_event(OBS_FRONTEND_EVENT_SCENE_CHANGED);
|
||||
api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED);
|
||||
}
|
||||
}
|
||||
|
||||
#define SERVICE_PATH "service.json"
|
||||
@@ -2271,6 +2273,11 @@ void OBSBasic::UpdateSceneSelection(OBSSource source)
|
||||
sceneChanging = false;
|
||||
|
||||
UpdateSources(scene);
|
||||
|
||||
OBSScene curScene =
|
||||
GetOBSRef<OBSScene>(ui->scenes->currentItem());
|
||||
if (api && scene != curScene)
|
||||
api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3508,6 +3515,9 @@ void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
|
||||
SetCurrentScene(source);
|
||||
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED);
|
||||
|
||||
UNUSED_PARAMETER(prev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user