Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaylo-matov committed Nov 4, 2024
1 parent b10590d commit cd6d125
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions TuneUp/TuneUpWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ internal void ResetProfiledNodes()

collectionMapping = new Dictionary<ObservableCollection<ProfiledNodeViewModel>, CollectionViewSource>
{
{ ProfiledNodesLatestRun, ProfiledNodesCollectionLatestRun },
{ProfiledNodesLatestRun, ProfiledNodesCollectionLatestRun },
{ProfiledNodesPreviousRun, ProfiledNodesCollectionPreviousRun },
{ProfiledNodesNotExecuted, ProfiledNodesCollectionNotExecuted }
};
Expand Down Expand Up @@ -370,10 +370,7 @@ internal void ResetProfiledNodes()
// Refresh UI if any changes were made
RaisePropertyChanged(nameof(ProfiledNodesCollectionNotExecuted));
ApplyCustomSorting(ProfiledNodesCollectionNotExecuted, SortByName);

ApplyGroupNodeFilter();

// Ensure table visibility is updated in case TuneUp was closed and reopened with the same graph.
UpdateTableVisibility();
}, null);
});
Expand Down Expand Up @@ -467,17 +464,18 @@ private void CurrentWorkspaceModel_EvaluationCompleted(object sender, Dynamo.Mod

CalculateGroupNodes();
UpdateExecutionTime();
UpdateTableVisibility();

RaisePropertyChanged(nameof(ProfiledNodesCollectionLatestRun));
RaisePropertyChanged(nameof(ProfiledNodesCollectionPreviousRun));
RaisePropertyChanged(nameof(ProfiledNodesCollectionNotExecuted));
UpdateTableVisibility();

uiContext.Post(_ =>
{
RaisePropertyChanged(nameof(ProfiledNodesCollectionLatestRun));
RaisePropertyChanged(nameof(ProfiledNodesCollectionPreviousRun));
RaisePropertyChanged(nameof(ProfiledNodesCollectionNotExecuted));

ApplyCustomSorting(ProfiledNodesCollectionLatestRun);
ProfiledNodesCollectionLatestRun.View?.Refresh();
ApplyCustomSorting(ProfiledNodesCollectionPreviousRun);

ProfiledNodesCollectionLatestRun.View?.Refresh();
ProfiledNodesCollectionPreviousRun.View?.Refresh();
ProfiledNodesCollectionNotExecuted.View?.Refresh();
}, null);
Expand Down Expand Up @@ -534,10 +532,18 @@ private void CalculateGroupNodes()
}
groupDictionary.Clear();

var a1 = ProfiledNodesLatestRun;
var a2 = ProfiledNodesPreviousRun;
var a3 = ProfiledNodesNotExecuted;

// Create group and time nodes for latest and previous runs
CreateGroupNodesForCollection(ProfiledNodesLatestRun);
CreateGroupNodesForCollection(ProfiledNodesPreviousRun);

var b1 = ProfiledNodesLatestRun;
var b2 = ProfiledNodesPreviousRun;
var b3 = ProfiledNodesNotExecuted;

// Create group nodes for not executed
var processedNodesNotExecuted = new HashSet<ProfiledNodeViewModel>();

Expand Down Expand Up @@ -1298,12 +1304,7 @@ private void MoveNodeToCollection(ProfiledNodeViewModel profiledNode, Observable
{
uiContext.Post(_ =>
{
var collections = new[]
{
ProfiledNodesLatestRun,
ProfiledNodesPreviousRun,
ProfiledNodesNotExecuted
};
var collections = new[] { ProfiledNodesLatestRun, ProfiledNodesPreviousRun, ProfiledNodesNotExecuted };

foreach (var collection in collections)
{
Expand Down

0 comments on commit cd6d125

Please sign in to comment.