UI: Add transition on double-click studio mode option

This adds the ability to switch to a scene by double-clicking it when in
studio mode.

(Edit by Jim: In case this change is undesired by the user, this has
been changed to be an option in general settings; disabled by default)

Closes jp9000/obs-studio#1029
This commit is contained in:
cg2121
2017-09-21 15:37:01 -05:00
committed by jp9000
parent 79c0f0105c
commit 3a43a047d4
6 changed files with 96 additions and 25 deletions

View File

@@ -3794,6 +3794,24 @@ void OBSBasic::on_sources_itemDoubleClicked(QListWidgetItem *witem)
CreatePropertiesWindow(source);
}
void OBSBasic::on_scenes_itemDoubleClicked(QListWidgetItem *witem)
{
if (!witem)
return;
if (IsPreviewProgramMode()) {
bool doubleClickSwitch = config_get_bool(App()->GlobalConfig(),
"BasicWindow", "TransitionOnDoubleClick");
if (doubleClickSwitch) {
OBSScene scene = GetCurrentScene();
if (scene)
SetCurrentScene(scene, false, true);
}
}
}
void OBSBasic::AddSource(const char *id)
{
if (id && *id) {