X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.server.io%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fserver%2Fio%2FCommandContextImpl.java;h=995ec0fda361ff92143b20bcb2268e7901de5ee7;hp=3277bbd1edfe02440a1b944f7f6c192c4808875c;hb=c09116b855b4bb4a377be1c573ddbb5d755c0bc1;hpb=2241c060cfc18cb34488de733ef80c9abc3f617d diff --git a/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/CommandContextImpl.java b/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/CommandContextImpl.java index 3277bbd1e..995ec0fda 100644 --- a/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/CommandContextImpl.java +++ b/bundles/org.simantics.document.server.io/src/org/simantics/document/server/io/CommandContextImpl.java @@ -66,6 +66,12 @@ public class CommandContextImpl implements CommandContextMutable { if (context != null) { Map>> from = context.getData(); for (Map.Entry>> entry : from.entrySet()) { + String key = entry.getKey(); + Object existing = getValue(key); + Object newValue = context.getValue(key); + // Do not merge duplicates! + if (newValue != null && newValue.equals(existing)) + continue; List> rows = ensureRowsAvailable(entry.getKey()); rows.addAll(entry.getValue()); }