From 9235a59d96331705a49afabca55789076845adf7 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Mon, 2 Jun 2025 19:25:07 -0400 Subject: [PATCH] Update AnnotationView.xaml.cs --- src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs b/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs index 8c5dfbc89d0..e071d37a929 100644 --- a/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs +++ b/src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs @@ -237,7 +237,10 @@ private void GroupTextBox_OnTextChanged(object sender, TextChangedEventArgs e) SetTextMaxWidth(); SetTextHeight(); - ViewModel.WorkspaceViewModel.HasUnsavedChanges = true; + if (GroupTextBox.ActualHeight > 0 && GroupTextBox.ActualWidth > 0) + { + ViewModel.WorkspaceViewModel.HasUnsavedChanges = true; + } } @@ -357,7 +360,10 @@ private void GroupDescriptionTextBox_TextChanged(object sender, TextChangedEvent if (ViewModel is null || !IsLoaded) return; SetTextHeight(); - ViewModel.WorkspaceViewModel.HasUnsavedChanges = true; + if (GroupDescriptionTextBox.ActualHeight > 0 && GroupDescriptionTextBox.ActualWidth > 0) + { + ViewModel.WorkspaceViewModel.HasUnsavedChanges = true; + } }