mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-09 02:36:35 +08:00
整理了下代码,摸一摸bug
This commit is contained in:
@@ -43,5 +43,18 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
ColorViewModel.LineColor.Color = Colors.Transparent;
|
||||
ColorViewModel.FillColor.Color = Colors.Transparent;
|
||||
}
|
||||
|
||||
|
||||
public override bool CanAttachTo(ConnectorInfoBase port)
|
||||
{
|
||||
if (port is BlockConnectorInfo blockConnectorInfo)
|
||||
{
|
||||
return port != this && !port.IsReadOnly && DataItem != blockConnectorInfo.DataItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1187,7 +1187,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
else if (parameter is IEnumerable<SelectableDesignerItemViewModelBase> items)
|
||||
{
|
||||
if (items.Select(p => AddVerify(p)).Any() != true) return;
|
||||
if (items.Select(p => AddVerify(p)).ToList().Any() != true) return;
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user