From 4abbf61bbd3afe36cb20eb7c7878af4e8234d2f0 Mon Sep 17 00:00:00 2001 From: kwai Date: Tue, 12 Mar 2024 19:26:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=94=BBbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIStudio.Wpf.DiagramDesigner/UserControls/LineControl.xaml.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AIStudio.Wpf.DiagramDesigner/UserControls/LineControl.xaml.cs b/AIStudio.Wpf.DiagramDesigner/UserControls/LineControl.xaml.cs index 95bf3c2..e3099f1 100644 --- a/AIStudio.Wpf.DiagramDesigner/UserControls/LineControl.xaml.cs +++ b/AIStudio.Wpf.DiagramDesigner/UserControls/LineControl.xaml.cs @@ -33,6 +33,7 @@ namespace AIStudio.Wpf.DiagramDesigner if (this.DataContext is ConnectionViewModel connector && connector.AnimationViewModel != null) { connector.AnimationViewModel.PropertyChanged -= Connector_PropertyChanged; + connector.PropertyChanged -= Connector_PropertyChanged; } _story?.Stop(); } @@ -43,6 +44,8 @@ namespace AIStudio.Wpf.DiagramDesigner { connector.AnimationViewModel.PropertyChanged -= Connector_PropertyChanged; connector.AnimationViewModel.PropertyChanged += Connector_PropertyChanged; + connector.PropertyChanged -= Connector_PropertyChanged; + connector.PropertyChanged += Connector_PropertyChanged; } this.ball.Visibility = Visibility.Collapsed; await DoAnimation(); @@ -54,6 +57,7 @@ namespace AIStudio.Wpf.DiagramDesigner { case nameof(AnimationViewModel.Animation): case nameof(AnimationViewModel.Duration): + case "PathGeneratorResult": await DoAnimation(); break; case nameof(AnimationViewModel.Start):