From 552a099ee0ea246ef80c743e92c0b115e02d4e2a Mon Sep 17 00:00:00 2001 From: jorgensigvardsson Date: Tue, 6 Jun 2017 15:49:26 +0200 Subject: [PATCH] Comparison with field rather than parameter causes crash (#85) * Bugfix: Must take polymorphic controls into consideration. * Bugfix: Must save original position of all tagged controls, regardless of the primary drag vertex status. Before the fix, it was possible to get out of sync with the "IsTagged" status of the primary drag vertex (it was set after the drag start). When that happened, the secondary vertices being dragged, did not have its OriginalX/Y properties updated, resulting in a "jump" from its visual origin to X=0, Y=0. * Bugfix: compare with argument, not default initialized field. --- .../LayoutAlgorithms/Tree/SimpleTreeLayoutAlgorithm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GraphX.PCL.Logic/Algorithms/LayoutAlgorithms/Tree/SimpleTreeLayoutAlgorithm.cs b/GraphX.PCL.Logic/Algorithms/LayoutAlgorithms/Tree/SimpleTreeLayoutAlgorithm.cs index 1c53583..b94fc03 100644 --- a/GraphX.PCL.Logic/Algorithms/LayoutAlgorithms/Tree/SimpleTreeLayoutAlgorithm.cs +++ b/GraphX.PCL.Logic/Algorithms/LayoutAlgorithms/Tree/SimpleTreeLayoutAlgorithm.cs @@ -24,7 +24,7 @@ namespace GraphX.PCL.Logic.Algorithms.LayoutAlgorithms public SimpleTreeLayoutAlgorithm( TGraph visitedGraph, IDictionary vertexPositions, IDictionary vertexSizes, SimpleTreeLayoutParameters parameters ) : base( visitedGraph, vertexPositions, parameters ) { - VertexSizes = VertexSizes == null ? new Dictionary() : new Dictionary(vertexSizes); + VertexSizes = vertexSizes == null ? new Dictionary() : new Dictionary(vertexSizes); } public override void Compute(CancellationToken cancellationToken)