Fix active timeline changes affecting render queue (fixes #814)
The `Timeline` type is mutable, so we need to create a copy before we pass it to GuiKeyframeRepository because we don't want anything stored in there (or more specifically in render queue which can also be added to from that gui) to be affected by subsequent changes.
This commit is contained in:
@@ -395,8 +395,11 @@ public class GuiPathing {
|
||||
public void keyframeRepoButtonPressed() {
|
||||
abortPathPlayback();
|
||||
try {
|
||||
TimelineSerialization serialization = new TimelineSerialization(mod.getCurrentTimeline(), null);
|
||||
String serialized = serialization.serialize(Collections.singletonMap("", mod.getCurrentTimeline().getTimeline()));
|
||||
Timeline currentTimeline = serialization.deserialize(serialized).get("");
|
||||
GuiKeyframeRepository gui = new GuiKeyframeRepository(
|
||||
mod.getCurrentTimeline(), replayHandler.getReplayFile(), mod.getCurrentTimeline().getTimeline());
|
||||
mod.getCurrentTimeline(), replayHandler.getReplayFile(), currentTimeline);
|
||||
Futures.addCallback(gui.getFuture(), new FutureCallback<Timeline>() {
|
||||
@Override
|
||||
public void onSuccess(Timeline result) {
|
||||
|
||||
Reference in New Issue
Block a user