diff --git a/source/ArmarXGui/libraries/RemoteGui/Storage.cpp b/source/ArmarXGui/libraries/RemoteGui/Storage.cpp index 843cd477dd579a9fcc0a6e904288550769b22fc8..c821d52fd5f6d3e7eae85ebfe7d799612a3b4106 100644 --- a/source/ArmarXGui/libraries/RemoteGui/Storage.cpp +++ b/source/ArmarXGui/libraries/RemoteGui/Storage.cpp @@ -17,10 +17,20 @@ namespace armarx::RemoteGui throw LocalException("Could find value with name: ") << name; } - int oldValue = getSingleValue<int>(oldIter->second, oldIter->first); - int newValue = getSingleValue<int>(newIter->second, newIter->first); + bool changed = false; + if (oldIter->second.type == VALUE_VARIANT_INT) + { + int oldValue = getSingleValue<int>(oldIter->second, oldIter->first); + int newValue = getSingleValue<int>(newIter->second, newIter->first); + changed = newValue > oldValue; + } else if (oldIter->second.type == VALUE_VARIANT_BOOL) + { + bool oldValue = getSingleValue<bool>(oldIter->second, oldIter->first); + bool newValue = getSingleValue<bool>(newIter->second, newIter->first); + changed = newValue != oldValue; + } - return newValue > oldValue; + return changed; } bool operator ==(const ValueVariant& left, const ValueVariant& right)