Skip to content

Commit 9cde95a

Browse files
committed
Replace recallViews list upon cascading snapshot recall
1 parent 36f09f6 commit 9cde95a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

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

422-
private final List<LXSnapshot.View> recallViews =
423-
new ArrayList<LXSnapshot.View>();
422+
private List<LXSnapshot.View> recallViews = new ArrayList<>();
424423

425424
/**
426425
* Recall this snapshot, apply all of its values
@@ -459,8 +458,7 @@ public boolean recall(LXGlobalSnapshot snapshot, List<LXCommand> commands) {
459458
commands.add(new LXCommand.Parameter.SetValue(this.autoCycleCursor, this.autoCycleCursor.getValuei()));
460459
}
461460
this.autoCycleCursor.setValue(snapshot.getIndex());
462-
this.recallViews.clear();
463-
this.recallViews.addAll(snapshot.views);
461+
this.recallViews = new ArrayList<>(snapshot.views);
464462
if (this.transitionEnabled.isOn()) {
465463
transition = true;
466464
this.inTransition = snapshot;

0 commit comments

Comments
 (0)