From 18b58f13db460e6ce5a18062822ca64998a985f2 Mon Sep 17 00:00:00 2001 From: Ivo Petrov <48355182+ivaylo-matov@users.noreply.github.com> Date: Wed, 17 Apr 2024 19:23:01 +0100 Subject: [PATCH] final draft --- src/DynamoCore/Graph/Annotations/AnnotationModel.cs | 4 ---- src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs | 2 -- src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs | 6 ++---- src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/DynamoCore/Graph/Annotations/AnnotationModel.cs b/src/DynamoCore/Graph/Annotations/AnnotationModel.cs index b251aef5aea..9069308eb63 100644 --- a/src/DynamoCore/Graph/Annotations/AnnotationModel.cs +++ b/src/DynamoCore/Graph/Annotations/AnnotationModel.cs @@ -366,10 +366,6 @@ public bool IsExpanded get { return isExpanded; } set { - // ip comment: - // this is called on undo! - // at the moment IsCollapsed is not called in the VM - // need to RaiseProperty changed from here? isExpanded = value; UpdateBoundaryFromSelection(); UpdateErrorAndWarningIconVisibility(); diff --git a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs index dd481427175..23ff3951986 100644 --- a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs +++ b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs @@ -2081,8 +2081,6 @@ internal void SendModelEvent(Guid modelGuid, string eventName, int value) HasUnsavedChanges = true; } - - // ip comment : this must be called ? internal void UpdateModelValue(IEnumerable modelGuids, string propertyName, string value) { if (modelGuids == null || (!modelGuids.Any())) diff --git a/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs index 71ffbf906d6..9822104b81b 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs @@ -6,11 +6,9 @@ using System.Windows.Input; using System.Windows.Media; using Dynamo.Configuration; -using Dynamo.Core; using Dynamo.Graph; using Dynamo.Graph.Annotations; using Dynamo.Graph.Nodes; -using Dynamo.Graph.Workspaces; using Dynamo.Logging; using Dynamo.Models; using Dynamo.Selection; @@ -928,7 +926,7 @@ private void CollapseGroupContents(bool collapseConnectors) if (!collapseConnectors) return; - CollapseConnectors(); + CollapseConnectors(); Analytics.TrackEvent(Actions.Collapsed, Categories.GroupOperations); } @@ -1236,7 +1234,7 @@ private void model_PropertyChanged(object sender, System.ComponentModel.Property } } - + private void OnModelRemovedFromGroup(object sender, EventArgs e) { Analytics.TrackEvent(Actions.RemovedFrom, Categories.GroupOperations, "Node"); diff --git a/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs b/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs index e7787d6cd57..8c5dfbc89d0 100644 --- a/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs +++ b/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs @@ -115,8 +115,6 @@ private void SetTextMaxWidth() this.ViewModel.AnnotationModel.TextMaxWidth = formattedText.Width + margin; } - - // ip comment: maybe use this logic for IsExpanded private void OnNodeColorSelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems == null || (e.AddedItems.Count <= 0))