mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 01:56:39 +02:00
Merge pull request #5303 from ZappoMan/animationGlitch
fix motor proteins in cell science
This commit is contained in:
commit
200cbd7e8d
2 changed files with 9 additions and 5 deletions
|
@ -84,14 +84,14 @@ void AnimationLoop::setStartAutomatically(bool startAutomatically) {
|
|||
}
|
||||
|
||||
void AnimationLoop::setRunning(bool running) {
|
||||
if (_running == running) {
|
||||
// don't do anything if the new value is the same as the value we already have
|
||||
if (_running != running) {
|
||||
_running = running;
|
||||
|
||||
// If we just set running to true, then also reset the frame to the first frame
|
||||
if (running) {
|
||||
// move back to the beginning
|
||||
_frameIndex = _firstFrame;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((_running = running)) {
|
||||
_frameIndex = _firstFrame;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,10 @@ void EntityItemProperties::setSittingPoints(const QVector<SittingPoint>& sitting
|
|||
}
|
||||
}
|
||||
|
||||
bool EntityItemProperties::animationSettingsChanged() const {
|
||||
return _animationSettingsChanged;
|
||||
}
|
||||
|
||||
void EntityItemProperties::setAnimationSettings(const QString& value) {
|
||||
// the animations setting is a JSON string that may contain various animation settings.
|
||||
// if it includes fps, frameIndex, or running, those values will be parsed out and
|
||||
|
|
Loading…
Reference in a new issue