morphshape animation fix

This commit is contained in:
honfika@gmail.com
2015-04-26 16:46:04 +02:00
parent 7803fb78b4
commit d28d72c096
3 changed files with 6 additions and 5 deletions

View File

@@ -688,10 +688,9 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
int frameCount = timelined.getTimeline().getFrameCount();
int newframe;
if (frameCount > 0) {
if (frame + 1 >= frameCount && !loop) {
newframe = frame;
} else {
newframe = (frame + 1) % frameCount;
newframe = (frame + 1) % frameCount;
if (newframe == 0 && !loop) {
stop();
}
} else {
newframe = frame;