From 577f9a03e6586264ce714778ec76d0984e1c3d67 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Mon, 23 Apr 2018 12:07:49 -0700 Subject: [PATCH] fix bug: animation reset on 'hold' --- libraries/entities/src/ModelEntityItem.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/entities/src/ModelEntityItem.cpp b/libraries/entities/src/ModelEntityItem.cpp index f759de915e..0f59bc673d 100644 --- a/libraries/entities/src/ModelEntityItem.cpp +++ b/libraries/entities/src/ModelEntityItem.cpp @@ -126,7 +126,6 @@ int ModelEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data, propertyFlags, overwriteLocalData, animationPropertiesChanged); if (animationPropertiesChanged) { applyNewAnimationProperties(animationProperties); - _flags |= Simulation::DIRTY_UPDATEABLE; somethingChanged = true; } }); @@ -355,8 +354,6 @@ void ModelEntityItem::setAnimationSettings(const QString& value) { animationProperties.setAllowTranslation(allowTranslation); } applyNewAnimationProperties(animationProperties); - // TODO? set the dirty flag inside applyNewAnimationProperties() - _flags |= Simulation::DIRTY_UPDATEABLE; }); } @@ -685,6 +682,9 @@ bool ModelEntityItem::applyNewAnimationProperties(AnimationPropertyGroup newProp // finally apply the changes bool somethingChanged = newProperties != _animationProperties; - _animationProperties = newProperties; + if (somethingChanged) { + _animationProperties = newProperties; + _flags |= Simulation::DIRTY_UPDATEABLE; + } return somethingChanged; }