Community
Participate
Working Groups
Build Identifier: 20100917-0705 there is a programming error at both GraphModelFactory and AbstractStylingModelFactory that makes graphs that use IFigureProvider for customizing nodes to have duplicated nodes. in GraphModelFactory: if (source == null) { // just create the node for the destination if (dest != null) { if (figureProvider != null) { createNode(model, dest, figureProvider.getFigure(dest)); } else { createNode(model, dest); } } continue; } else if (dest == null) { // just create the node for the source if (source != null) { if (figureProvider != null) { createNode(model, source, figureProvider.getFigure(dest));<-- Should be source here. } else { createNode(model, source); } } continue; } in AbstractStylingModelFactory: if (sn == null) { IFigure figure = null; if (figureProvider != null) { figure = figureProvider.getFigure(source); } if (figure != null) { sn = createNode(graph, source, figure); } else { sn = createNode(graph, source); } } if (dn == null) { IFigure figure = null; if (figureProvider != null) { figure = figureProvider.getFigure(source);<-- should be dest here } if (figure != null) { dn = createNode(graph, dest, figure); } else { dn = createNode(graph, dest); } } Reproducible: Always
Could you attach a snippet that hits this issue? I tried reproducing it but the sample with IFigureProvider I ran doesn't enter GraphModelFactory#doBuildGraph.
Created attachment 188418 [details] Duplicated Nodes Test Here it goes. Maybe i'm using graphviewer the wrong way.
Thanks Alejandro! Fixed in HEAD and Zest 2.0 master (see IFigureProviderTests).