From d0e06878db50046d65707a293675550ce0949d77 Mon Sep 17 00:00:00 2001 From: Micheline Wu <69046953+michelinewu@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:30:31 -0500 Subject: [PATCH] Fix for collectibles duplicated in vertical display. --- app/components-react/pages/BrowseOverlays.tsx | 4 +++- app/services/scenes/scenes.ts | 18 +----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/app/components-react/pages/BrowseOverlays.tsx b/app/components-react/pages/BrowseOverlays.tsx index acca75db084e..ed41db0b930b 100644 --- a/app/components-react/pages/BrowseOverlays.tsx +++ b/app/components-react/pages/BrowseOverlays.tsx @@ -172,7 +172,9 @@ export default function BrowseOverlays(p: { } const sourceSettings = - type === 'video' ? { looping: true, local_file: localFile } : { file: localFile }; + type === 'video' + ? { looping: true, local_file: localFile, display: 'horizontal' } + : { file: localFile, display: 'horizontal' }; return ScenesService.actions.return.createAndAddSource( sceneId, diff --git a/app/services/scenes/scenes.ts b/app/services/scenes/scenes.ts index 3f81d971266e..fe8dfdff32c6 100644 --- a/app/services/scenes/scenes.ts +++ b/app/services/scenes/scenes.ts @@ -460,28 +460,12 @@ export class ScenesService extends StatefulService { const sceneItem = scene.createAndAddSource(sourceName, sourceType, settings); - const createVerticalNode = () => { + if (this.dualOutputService.views.hasSceneNodeMaps) { this.dualOutputService.createPartnerNode(sceneItem); /* For some reason dragging items after enabling dual output makes them * duplicate, associate selection on switch to mitigate this issue */ this.selectionService.associateSelectionWithDisplay('vertical'); - }; - - if (this.dualOutputService.state.dualOutputMode) { - createVerticalNode(); - } else { - // Schedule vertical node to be created if the user toggles on dual output in the same session - this.dualOutputService.dualOutputModeChanged - .pipe( - // If we switch collections before we enable dual output drop it - // we don't wanna create nodes on inactive scene collections - takeUntil(this.sceneCollectionsService.collectionWillSwitch), - filter(gotEnabled => !!gotEnabled), - take(1), - tap(createVerticalNode), - ) - .subscribe(); } return sceneItem.sceneItemId;