Use ControlFactory for edge deserialization

The deserialization code was using ControlFactory for vertexes, but not
edges. Code is modified to use ControlFactory for edges also.
This commit is contained in:
perturbare 2015-05-19 18:31:14 -07:00
Родитель 58ead875af
Коммит 545687e90f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1515,7 +1515,7 @@ namespace GraphX.WPF.Controls
if (datasource == null || datatarget == null) if (datasource == null || datatarget == null)
throw new GX_SerializationException("DeserializeFromFile() -> Serialization logic is broken! Vertex not found. All vertices must be processed before edges!"); throw new GX_SerializationException("DeserializeFromFile() -> Serialization logic is broken! Vertex not found. All vertices must be processed before edges!");
var ecc = new EdgeControl { Edge = edgedata, Source = _vertexlist[datasource], Target = _vertexlist[datatarget], DataContext = edgedata}; var ecc = ControlFactory.CreateEdgeControl(_vertexlist[datasource], _vertexlist[datatarget], edgedata);
InsertEdge(edgedata, ecc); InsertEdge(edgedata, ecc);
LogicCore.Graph.AddEdge(edgedata); LogicCore.Graph.AddEdge(edgedata);
} }