Skip to content

Commit

Permalink
Merge branch 'pm-publishpackage-packagecontents-ml' into pm-publishpa…
Browse files Browse the repository at this point in the history
…ckage-packagecontents-revert
  • Loading branch information
dnenov committed Nov 20, 2023
2 parents 5706467 + 2676995 commit 379edac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,9 @@ internal void PackageManagerViewClose()
InitialResultsLoaded = false;
TimedOut = false;

RequestShowFileDialog -= OnRequestShowFileDialog; // adding this back in

ClearSearchResults(); // also clear all SearchResults and unsubscribe
ClearMySearchResults();
}

Expand All @@ -1622,6 +1625,9 @@ internal void Dispose()
TimedOut = false; // reset the timedout screen
InitialResultsLoaded = false; // reset the loading screen settings

RequestShowFileDialog -= OnRequestShowFileDialog; // adding this back in

ClearSearchResults(); // also clear all SearchResults and unsubscribe
ClearMySearchResults();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Dynamo.PackageManager
{
public class PackageManagerViewModel : NotificationObject
public class PackageManagerViewModel : NotificationObject, IDisposable
{
private DynamoViewModel dynamoViewModel;
private InstalledPackagesViewModel installedPackagesViewModel;
Expand Down Expand Up @@ -75,5 +75,12 @@ private void InitializeInstalledPackages()
}
}

/// <summary>
/// Dispose method of the PackageManagerViewModel
/// </summary>
public void Dispose()
{
LocalPackages.CollectionChanged -= LocalPackages_CollectionChanged;
}
}
}
1 change: 1 addition & 0 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,7 @@ private void WindowClosed(object sender, EventArgs e)
this.Dispose();
sharedViewExtensionLoadedParams?.Dispose();
this._pkgSearchVM?.Dispose();
this._pkgVM?.Dispose();
}

// the key press event is being intercepted before it can get to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
using System.Windows.Input;
using Dynamo.Logging;
using Dynamo.Models;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using Dynamo.Logging;
using Dynamo.UI;
using Dynamo.ViewModels;
using Dynamo.Wpf.Utilities;
Expand Down Expand Up @@ -132,6 +126,7 @@ public void Dispose()
Actions.Close,
Categories.PackageManagerOperations);

PublishPackageViewModel.PublishSuccess -= PackageViewModelOnPublishSuccess;
PublishPackageViewModel.RequestShowFolderBrowserDialog -= OnRequestShowFolderBrowserDialog;
}

Expand Down

0 comments on commit 379edac

Please sign in to comment.