Skip to content

Commit a0a569e

Browse files
committed
FIX: Error adding Spine animation.
1 parent 20395c6 commit a0a569e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

adventure-editor/src/main/java/com/bladecoder/engineeditor/ui/EditAnimationDialog.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public EditAnimationDialog(Skin skin, SpriteActor p, AnimationDesc e) {
102102
Param.Type.BOOLEAN, true, "true");
103103
dispose = InputPanelFactory.createInputPanel(skin, "Dispose When Played", "Dispose de animation after playing",
104104
Param.Type.BOOLEAN, true, "false");
105-
105+
106+
106107
((SelectBox<String>) repeat.getField()).addListener(new ChangeListener() {
107108

108109
@Override
@@ -144,12 +145,15 @@ public void changed(ChangeEvent event, Actor actor) {
144145
});
145146

146147
setInfoWidget(spriteWidget);
147-
148-
parent = p;
149-
addSources();
150148

151149
init(p, e, new InputPanel[] { source, localizable, atlas, id, repeat, speed, count, in, out, sound, preload,
152150
dispose });
151+
152+
addSources();
153+
154+
// call modelToInputs again to set the correct source
155+
if( e != null )
156+
modelToInputs();
153157

154158
setVisible(count, false);
155159
setVisible(atlas, false);

0 commit comments

Comments
 (0)