Fix movement of keyframe via GuiEditKeyframe not updating selected keyframe
Selecting a keyframe, double clicking it to open the gui, changing the timestamp, saving and then clicking the Add/Remove Keyframe button used to crash the client. This is fixed by updating the selection whenever the time is changed.
This commit is contained in:
@@ -109,6 +109,9 @@ public abstract class GuiEditKeyframe<T extends GuiEditKeyframe<T>> extends Abst
|
|||||||
if (newTime != time) {
|
if (newTime != time) {
|
||||||
change = CombinedChange.createFromApplied(change,
|
change = CombinedChange.createFromApplied(change,
|
||||||
gui.getMod().getCurrentTimeline().moveKeyframe(path, time, newTime));
|
gui.getMod().getCurrentTimeline().moveKeyframe(path, time, newTime));
|
||||||
|
if (gui.getMod().getSelectedPath() == path && gui.getMod().getSelectedTime() == time) {
|
||||||
|
gui.getMod().setSelected(path, newTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gui.getMod().getCurrentTimeline().getTimeline().pushChange(change);
|
gui.getMod().getCurrentTimeline().getTimeline().pushChange(change);
|
||||||
close();
|
close();
|
||||||
|
|||||||
Reference in New Issue
Block a user