Fix next frame command

This commit is contained in:
Jeremy Bullock 2020-04-30 21:14:53 -06:00
parent cde73f63c9
commit ad14513b72

View file

@ -2839,7 +2839,10 @@ public:
void execute() {
StopMotion *sm = StopMotion::instance();
int index = TApp::instance()->getCurrentFrame()->getFrameIndex();
if (index < sm->getXSheetFrameNumber() - 1) {
int maxInXSheet =
TApp::instance()->getCurrentXsheet()->getXsheet()->getFrameCount();
int max = std::max(maxInXSheet, sm->getXSheetFrameNumber());
if (index < max) {
TApp::instance()->getCurrentFrame()->setFrame(index + 1);
}
}