summaryrefslogtreecommitdiff
path: root/Source/ModelViewer
diff options
context:
space:
mode:
authorGravatar Michal Moskal <michal@moskal.me>2011-11-08 19:22:43 -0800
committerGravatar Michal Moskal <michal@moskal.me>2011-11-08 19:22:43 -0800
commit8047d5e14ec77132d329f0eb6e200298d537a67e (patch)
treea86282f65821e411465c111065a7249ce6d8036e /Source/ModelViewer
parent6200497898b39084256c7551ff46d80120291f0d (diff)
BVD: don't do the "Duplicate entry exception"; uncomment for debugging
Diffstat (limited to 'Source/ModelViewer')
-rw-r--r--Source/ModelViewer/Namer.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/ModelViewer/Namer.cs b/Source/ModelViewer/Namer.cs
index c1d7fcd3..afcb0fe6 100644
--- a/Source/ModelViewer/Namer.cs
+++ b/Source/ModelViewer/Namer.cs
@@ -159,7 +159,13 @@ namespace Microsoft.Boogie.ModelViewer
Action<IEnumerable<IDisplayNode>> addList = (IEnumerable<IDisplayNode> nodes) =>
{
- var ch = nodes.ToDictionary(x => x.Name);
+ var ch = new Dictionary<string, IDisplayNode>();
+ foreach (var x in nodes) {
+ if (ch.ContainsKey(x.Name)) {
+ // throw new System.InvalidOperationException("duplicated model entry: " + x.Name);
+ }
+ ch[x.Name] = x;
+ }
foreach (var k in SortFields(nodes))
workList.Enqueue(ch[k]);
};