mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +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) {
|
||||
if (isRunning() == running) {
|
||||
if (running && isRunning()) {
|
||||
// if we're already running, this is the same as a restart
|
||||
if (running) {
|
||||
// move back to the beginning
|
||||
setFrameIndex(getFirstFrame());
|
||||
return;
|
||||
}
|
||||
setFrameIndex(getFirstFrame());
|
||||
return;
|
||||
}
|
||||
_animationLoop.setRunning(running);
|
||||
if (isRunning()) {
|
||||
|
|
Loading…
Reference in a new issue