Skip to content

Commit 297f2c8

Browse files
committed
only subscribe if scene selection by name is active
1 parent 7c5dd44 commit 297f2c8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/actions/control.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ export function createControlActions(self: InstanceBaseExt<WingConfig>): Compani
5959
send(ControlCommands.LibrarySceneSelectionIndex(), sceneId)
6060
send(ControlCommands.LibraryAction(), 'GO')
6161
},
62-
subscribe: () => {
63-
subscriptions.subscribePoll(ControlCommands.LibraryScenes())
62+
subscribe: (event) => {
63+
if (event.options.useSceneId == false) {
64+
subscriptions.subscribePoll(ControlCommands.LibraryScenes())
65+
}
6466
ensureLoaded(ControlCommands.LibraryActiveSceneIndex())
6567
ensureLoaded(ControlCommands.LibraryNode(), '?')
6668
},
67-
unsubscribe: () => {
68-
subscriptions.unsubscribePoll(ControlCommands.LibraryScenes())
69-
},
7069
learn: (event) => {
7170
const sceneIdMap = state.sceneNameToIdMap
7271
const cmd = ControlCommands.LibraryActiveSceneIndex()

0 commit comments

Comments
 (0)