mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:14:34 +02:00
Condense logic
This commit is contained in:
parent
2c5201f116
commit
85e5216fc1
1 changed files with 3 additions and 6 deletions
|
@ -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()) {
|
||||||
|
|
Loading…
Reference in a new issue