Condense logic

This commit is contained in:
David Rowe 2015-04-14 16:54:29 -07:00
parent 2c5201f116
commit 85e5216fc1

View file

@ -60,13 +60,10 @@ void AnimationHandle::setMaskedJoints(const QStringList& maskedJoints) {
} }
void AnimationHandle::setRunning(bool running) { void AnimationHandle::setRunning(bool running) {
if (isRunning() == running) { if (running && isRunning()) {
// if we're already running, this is the same as a restart // if we're already running, this is the same as a restart
if (running) { setFrameIndex(getFirstFrame());
// move back to the beginning return;
setFrameIndex(getFirstFrame());
return;
}
} }
_animationLoop.setRunning(running); _animationLoop.setRunning(running);
if (isRunning()) { if (isRunning()) {