Skip to content

Commit

Permalink
Update AnnotationViewModel.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Mar 2, 2025
1 parent 12decc2 commit 5ee0dce
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,16 +1249,25 @@ private void OnModelAddedToGroup(object sender, EventArgs e)

private void UpdateAllGroupedGroups()
{
using (NestedGroupsGeometries.DeferCollectionReset())
try
{
if (ViewModelBases != null)
{
ViewModelBases
.OfType<AnnotationViewModel>()
.ToList()
.ForEach(x => UpdateGroupCutGeometry(x));
using (NestedGroupsGeometries.DeferCollectionReset())
{
if (ViewModelBases != null)
{
ViewModelBases
.OfType<AnnotationViewModel>()
.ToList()
.ForEach(x => UpdateGroupCutGeometry(x));
}
}
}
catch (Exception ex)
{
WorkspaceViewModel.DynamoViewModel.Model.Logger.Log("Error updating all grouped groups");
WorkspaceViewModel.DynamoViewModel.Model.Logger.Log(ex);
WorkspaceViewModel.DynamoViewModel.Model.Logger.Log(ex.StackTrace);
}
}

private void HandleNodesCollectionChanges()
Expand Down

0 comments on commit 5ee0dce

Please sign in to comment.