diff --git a/GraphLayout/tools/WpfGraphControl/GraphViewer.cs b/GraphLayout/tools/WpfGraphControl/GraphViewer.cs index 80ab850f..31b8aaf0 100644 --- a/GraphLayout/tools/WpfGraphControl/GraphViewer.cs +++ b/GraphLayout/tools/WpfGraphControl/GraphViewer.cs @@ -1439,6 +1439,11 @@ static TextBlock CreateTextBlock(Label drawingLabel) { textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); textBlock.Width = textBlock.DesiredSize.Width; textBlock.Height = textBlock.DesiredSize.Height; + if (drawingLabel.GeometryLabel == null) { + drawingLabel.GeometryLabel = new Core.Layout.Label(); + } + drawingLabel.GeometryLabel.Width = textBlock.Width; + drawingLabel.GeometryLabel.Height = textBlock.Height; return textBlock; } @@ -1729,4 +1734,4 @@ void MakeRoomForNewNode(Drawing.Node drawingNode) { public bool IncrementalDraggingModeAlways { get; set; } public bool CreateToolTipForNodes { get => createToolTipForNodes; private set => createToolTipForNodes = value; } } -} \ No newline at end of file +}