From 6ed4937dc0f627074bb533d5b5c1d938a03a599c Mon Sep 17 00:00:00 2001 From: milad Date: Mon, 18 Mar 2019 10:12:32 -0700 Subject: [PATCH] Updated engine code to not emit if dominant hand isn't actually changed --- interface/src/avatar/MyAvatar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 02ef91cdba..9813070308 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -324,8 +324,11 @@ QString MyAvatar::getDominantHand() const { void MyAvatar::setDominantHand(const QString& hand) { if (hand == DOMINANT_LEFT_HAND || hand == DOMINANT_RIGHT_HAND) { - _dominantHand.set(hand); - emit dominantHandChanged(hand); + bool changed = (hand != _dominantHand.get()); + if (changed) { + _dominantHand.set(hand); + emit dominantHandChanged(hand); + } } }