Skip to content
Snippets Groups Projects
Commit b22706ed authored by Christoph Pohl's avatar Christoph Pohl
Browse files

Fix getButtonClicked also working for toggleButtons

parent 1c03f97a
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment