From 9f9c1e2d97e702d7fcf8685e36a8bf1431e5d3b4 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Wed, 15 Nov 2017 15:04:24 -0700 Subject: [PATCH] 9267 Fix not restoring animations after changing view modes --- libraries/animation/src/Rig.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index f06156874b..78aa1f4ba8 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -179,6 +179,11 @@ void Rig::restoreRoleAnimation(const QString& role) { } else { qCWarning(animation) << "Rig::restoreRoleAnimation could not find role " << role; } + + auto statesIter = _roleAnimStates.find(role); + if (statesIter != _roleAnimStates.end()) { + _roleAnimStates.erase(statesIter); + } } } else { qCWarning(animation) << "Rig::overrideRoleAnimation avatar not ready yet";