Commit ce6d9d1f authored by Jörg Richter's avatar Jörg Richter

Fix: removing a value from a nested multi-value (#193)

parent 9f9e0228
Pipeline #5960 passed with stages
in 2 minutes and 46 seconds
......@@ -786,8 +786,21 @@ class ValueIntegrator {
throw new RuntimeException("Topic " + topicId + " not found in " + topics);
}
/**
* Checks whether the 1st list contains the same topics as represented by the 2nd list of values,
* based on topic ID, regardless of order. Only non-empty values are compared.
*/
private static boolean matches(List<? extends TopicModel> topics, List<UnifiedValue> values) {
return topics.size() == values.size() && topics.containsAll(values);
int valueCount = 0;
for (UnifiedValue value : values) {
if (value.value != null) {
if (!topics.contains(value)) {
return false;
}
valueCount++;
}
}
return topics.size() == valueCount;
}
// ---
......
......@@ -9,7 +9,7 @@ import 'font-awesome/css/font-awesome.css'
import './element-ui'
import './websocket'
console.log('[DMX] 2019/04/28')
console.log('[DMX] 2019/04/29')
// 1) Init dm5 library
// The dm5 library must be inited *before* the dm5-webclient component is instantiated.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment