From a184dce65038b440b4ab77b65ad94c07745681ae Mon Sep 17 00:00:00 2001 From: "fan.yaying" Date: Mon, 11 Sep 2023 10:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=BF=9E=E6=8E=A5=E7=82=B9?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=A0=B9=E6=8D=AE=E5=9D=90?= =?UTF-8?q?=E6=A0=87=E4=BD=8D=E7=BD=AE=E6=89=BE=E4=B8=8D=E5=88=B0=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=A0=B9=E6=8D=AEid=E5=86=8D=E6=9F=A5=E6=89=BE?= =?UTF-8?q?=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseViewModel/DesignerItemViewModelBase.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs index c0e2f8e..dff8e2d 100644 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs +++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs @@ -211,7 +211,7 @@ namespace AIStudio.Wpf.DiagramDesigner } } - private double _itemHeight = 65; + private double _itemHeight = 65; [CanDo] [Browsable(true)] public double ItemHeight @@ -228,7 +228,7 @@ namespace AIStudio.Wpf.DiagramDesigner RaisePropertyChanged(nameof(PhysicalItemHeight)); } } - } + } [DisplayName("ItemWidth(mm)")] [Browsable(true)] @@ -444,7 +444,7 @@ namespace AIStudio.Wpf.DiagramDesigner { return new PointBase(Left, Top); } - } + } [CanDo] public PointBase TopLeft @@ -746,7 +746,12 @@ namespace AIStudio.Wpf.DiagramDesigner { if (isInnerPoint) { - return this.Connectors.Where(p => p.XRatio == xRatio && p.YRatio == yRatio).FirstOrDefault(); + var connector = Connectors.FirstOrDefault(p => p.XRatio == xRatio && p.YRatio == yRatio); + if (connector == null) + { + connector = Connectors.FirstOrDefault(p => p.Id == connectorId); + } + return connector; } else if (isPortless) {