Skip to content

Commit

Permalink
add unsub
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Dec 8, 2023
1 parent 579b3f1 commit fba8e45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,13 @@ private void OnMoreInfoClicked(object sender, RoutedEventArgs e)

internal void CloseAutocompletionWindow(object sender, RoutedEventArgs e)
{
OnRequestShowNodeAutoCompleteSearch(ShowHideFlags.Hide);
CloseAutoCompletion();
}

internal void CloseAutoCompletion()
{
OnRequestShowNodeAutoCompleteSearch(ShowHideFlags.Hide);
ViewModel.OnNodeAutoCompleteWindowClosed();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,11 @@ internal void PopulateDefaultAutoCompleteCandidates()
}
}

internal void OnNodeAutoCompleteWindowClosed()
{
dynamoViewModel.CurrentSpaceViewModel.Model.NodeRemoved -= NodeViewModel_Removed;
}

internal void NodeViewModel_Removed(NodeModel node)
{
ParentNodeRemoved?.Invoke(node);
Expand Down

0 comments on commit fba8e45

Please sign in to comment.