mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
整理序列化
This commit is contained in:
@@ -373,10 +373,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
Connector sinkConnector = connectorsHit.Last();
|
||||
FullyCreatedConnectorInfo sinkDataItem = sinkConnector.DataContext as FullyCreatedConnectorInfo;
|
||||
|
||||
int indexOfLastTempConnection = sinkDataItem.DataItem.Parent.Items.Count - 1;
|
||||
sinkDataItem.DataItem.Parent.DirectRemoveItemCommand.Execute(
|
||||
sinkDataItem.DataItem.Parent.Items[indexOfLastTempConnection]);
|
||||
sinkDataItem.DataItem.Parent.AddItemCommand.Execute(new ConnectorViewModel(_viewModel, sourceDataItem, sinkDataItem, DrawMode, RouterMode));
|
||||
int indexOfLastTempConnection = sinkDataItem.DataItem.Root.Items.Count - 1;
|
||||
sinkDataItem.DataItem.Root.DirectRemoveItemCommand.Execute(
|
||||
sinkDataItem.DataItem.Root.Items[indexOfLastTempConnection]);
|
||||
sinkDataItem.DataItem.Root.AddItemCommand.Execute(new ConnectorViewModel(_viewModel, sourceDataItem, sinkDataItem, DrawMode, RouterMode));
|
||||
}
|
||||
else if (_service.DrawModeViewModel.GetDrawMode() == DrawMode.DirectLine && connectorsHit.Count() == 1)
|
||||
{
|
||||
@@ -396,9 +396,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
else
|
||||
{
|
||||
//Need to remove last item as we did not finish drawing the path
|
||||
int indexOfLastTempConnection = sourceDataItem.DataItem.Parent.Items.Count - 1;
|
||||
sourceDataItem.DataItem.Parent.DirectRemoveItemCommand.Execute(
|
||||
sourceDataItem.DataItem.Parent.Items[indexOfLastTempConnection]);
|
||||
int indexOfLastTempConnection = sourceDataItem.DataItem.Root.Items.Count - 1;
|
||||
sourceDataItem.DataItem.Root.DirectRemoveItemCommand.Execute(
|
||||
sourceDataItem.DataItem.Root.Items[indexOfLastTempConnection]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user