Skip to content
Snippets Groups Projects
Commit 3208d0cd authored by Simon Ottenhaus's avatar Simon Ottenhaus
Browse files

RemoteGui::TabProxy send only dirty values

parent d02eddb4
No related branches found
No related tags found
No related merge requests found
......@@ -165,9 +165,14 @@ void RemoteGuiProvider::setValues(const std::string& tabId, const RemoteGui::Val
{
{
std::unique_lock<std::mutex> lock(tabMutex);
tabStates.at(tabId) = values;
RemoteGui::ValueMap merged = tabStates.at(tabId);
for (const auto& pair : values)
{
merged[pair.first] = pair.second;
}
tabStates.at(tabId) = merged;
topic->reportStateChanged(tabId, merged);
}
topic->reportStateChanged(tabId, values);
}
RemoteGui::WidgetStateMap RemoteGuiProvider::getWidgetStates(const std::string& tabId, const Ice::Current&)
......
......@@ -39,6 +39,7 @@ namespace armarx
currentValues = remoteGui->getValues(tabId);
newValues = currentValues;
valuesChanged = false;
dirtyValues.clear();
currentWidgetStates = remoteGui->getWidgetStates(tabId);
oldWidgetStates = currentWidgetStates;
......@@ -50,7 +51,8 @@ namespace armarx
{
if (valuesChanged)
{
remoteGui->setValues(tabId, newValues);
remoteGui->setValues(tabId, dirtyValues);
dirtyValues.clear();
}
if (widgetChanged)
{
......@@ -78,6 +80,7 @@ namespace armarx
valuesChanged = true;
}
newValues[name] = RemoteGui::makeValue(value);
dirtyValues[name] = RemoteGui::makeValue(value);
}
bool internalButtonClicked(std::string const& name) const
......@@ -121,6 +124,7 @@ namespace armarx
RemoteGui::ValueMap currentValues;
RemoteGui::ValueMap oldValues;
RemoteGui::ValueMap newValues;
RemoteGui::ValueMap dirtyValues;
RemoteGui::WidgetStateMap currentWidgetStates;
RemoteGui::WidgetStateMap oldWidgetStates;
......
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