Skip to content

Commit cc6cbec

Browse files
committed
Use stack state for recall view list, not engine scope
1 parent 9cc4a1a commit cc6cbec

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/main/java/heronarts/lx/snapshot/LXSnapshotEngine.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,6 @@ public LXGlobalSnapshot getCursorSnapshot() {
419419
return null;
420420
}
421421

422-
private final List<LXSnapshot.View> recallViews =
423-
new ArrayList<LXSnapshot.View>();
424-
425422
/**
426423
* Recall this snapshot, apply all of its values
427424
*
@@ -459,8 +456,10 @@ public boolean recall(LXGlobalSnapshot snapshot, List<LXCommand> commands) {
459456
commands.add(new LXCommand.Parameter.SetValue(this.autoCycleCursor, this.autoCycleCursor.getValuei()));
460457
}
461458
this.autoCycleCursor.setValue(snapshot.getIndex());
462-
this.recallViews.clear();
463-
this.recallViews.addAll(snapshot.views);
459+
460+
final List<View> recallViews = new ArrayList<>();
461+
recallViews.addAll(snapshot.views);
462+
464463
if (this.transitionEnabled.isOn()) {
465464
transition = true;
466465
this.inTransition = snapshot;
@@ -470,12 +469,12 @@ public boolean recall(LXGlobalSnapshot snapshot, List<LXCommand> commands) {
470469
if (this.missingChannelMode.getEnum() == MissingChannelMode.DISABLE) {
471470
for (LXAbstractChannel channel : this.lx.engine.mixer.channels) {
472471
if (channel.enabled.isOn() && !snapshot.hasChannelFaderView(channel)) {
473-
this.recallViews.add(snapshot.getMissingChannelView(channel));
472+
recallViews.add(snapshot.getMissingChannelView(channel));
474473
}
475474
}
476475
}
477476

478-
for (View view : this.recallViews) {
477+
for (View view : recallViews) {
479478
if (view.activeFlag = isValidView(view, mixer, pattern, effect, modulation, output, master)) {
480479
if (transition) {
481480
view.startTransition();

0 commit comments

Comments
 (0)