From 08a0f204a04784de341dda0612ee899bedcc1417 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Wed, 20 Dec 2017 08:52:49 +0200 Subject: [PATCH] Read previous BTree modification count from the graph Modification count is used when generating unique names for the resources. We should continue from the previous modification count whenever creating new BTree object to work on. refs #7690 Change-Id: I446af8ad22157a1c64c984071ae6c36cae374935 --- .../src/org/simantics/datatypes/utils/BTreeUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.datatypes/src/org/simantics/datatypes/utils/BTreeUtils.java b/bundles/org.simantics.datatypes/src/org/simantics/datatypes/utils/BTreeUtils.java index 7d4f782a9..60ceba1b5 100644 --- a/bundles/org.simantics.datatypes/src/org/simantics/datatypes/utils/BTreeUtils.java +++ b/bundles/org.simantics.datatypes/src/org/simantics/datatypes/utils/BTreeUtils.java @@ -380,7 +380,8 @@ final public class BTreeUtils implements BTreeContentManager { this.ownerRelation = ownerRelation; this.nodeType = nodeType != null ? nodeType : DATA.BTreeNode; this.t = t; - this.mod = 0; + Long possibleMod = graph.getPossibleRelatedValue(tree, DATA.BTree_mod, Bindings.LONG); + this.mod = possibleMod != null ? possibleMod : 0; this.cached = cached; if (cached) { this.beans = new HashMap(); -- 2.43.2