From 80648239b3cfa7aa738b6cf199d49b3b4ca967c8 Mon Sep 17 00:00:00 2001 From: miroiu Date: Tue, 31 Oct 2023 19:47:25 +0200 Subject: [PATCH] [Nodify] PendingConnection.PreviewTarget fixes [Playground] Hide pending connection preview container when PreviewText is null #76 Add tooltip back to playground settings --- CHANGELOG.md | 2 ++ .../Editor/NodifyEditorView.xaml | 2 +- .../Editor/PendingConnectionViewModel.cs | 6 +++--- Examples/Nodify.Playground/SettingsView.xaml | 2 +- .../Converters/StringToVisibilityConverter.cs | 21 +++++++++++++++++++ Nodify/Connections/PendingConnection.cs | 10 +++++++++ 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Examples/Nodify.Shared/Converters/StringToVisibilityConverter.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index 05079a38..589868b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ > - Added ItemContainer.SelectedBorderThickness dependency property > - Bugfixes: > - Fixed PendingConnection.PreviewTarget not being set to null when there is no actual target +> - Fixed PendingConnection.PreviewTarget not being set on Connector.PendingConnectionStartedEvent +> - Fixed PendingConnection.PreviewTarget not being set to null on Connector.PendingConnectionCompletedEvent > - Fixed connectors panel not being affected by Node.VerticalAlignment > - Changing BorderThickness causes layout shift when selecting an item container > - Fixed the unintentional movement caused by snapping correction diff --git a/Examples/Nodify.Playground/Editor/NodifyEditorView.xaml b/Examples/Nodify.Playground/Editor/NodifyEditorView.xaml index bff4091f..d5607380 100644 --- a/Examples/Nodify.Playground/Editor/NodifyEditorView.xaml +++ b/Examples/Nodify.Playground/Editor/NodifyEditorView.xaml @@ -267,7 +267,7 @@ _previewText; set => SetProperty(ref _previewText, value); @@ -44,7 +44,7 @@ protected virtual void OnPreviewTargetChanged() ConnectorViewModel con when con == Source => $"Can't connect to self", ConnectorViewModel con => $"{(canConnect ? "Connect" : "Can't connect")} to {con.Title ?? "pin"}", FlowNodeViewModel flow => $"{(canConnect ? "Connect" : "Can't connect")} to {flow.Title ?? "node"}", - _ => $"Drop on connector" + _ => null }; } } diff --git a/Examples/Nodify.Playground/SettingsView.xaml b/Examples/Nodify.Playground/SettingsView.xaml index 3ed3a2c9..ccef048f 100644 --- a/Examples/Nodify.Playground/SettingsView.xaml +++ b/Examples/Nodify.Playground/SettingsView.xaml @@ -35,7 +35,7 @@ - +