Skip to content

Commit

Permalink
Fix bug (#3821)
Browse files Browse the repository at this point in the history
  • Loading branch information
timkur committed Sep 10, 2024
1 parent c9745cc commit 9914bc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@ private void AllExternalTools_CollectionChanged(object? sender, NotifyCollection
// with it.
if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems is not null)
{
List<Tool> newAnalysisTools = new();

foreach (Tool tool in e.NewItems)
{
if (tool.Type.HasFlag(ToolType.DumpAnalyzer))
{
_registeredAnalysisTools.Add(tool);
newAnalysisTools.Add(tool);
}
}

foreach (var report in _werAnalysisReports)
{
RunToolAnalysis(report, e.NewItems.Cast<Tool>().ToList());
RunToolAnalysis(report, newAnalysisTools);
}
}

Expand All @@ -101,11 +104,11 @@ private void AllExternalTools_CollectionChanged(object? sender, NotifyCollection
if (tool.Type.HasFlag(ToolType.DumpAnalyzer))
{
_registeredAnalysisTools.Remove(tool);
}

foreach (var report in _werAnalysisReports)
{
report.RemoveToolAnalysis(tool);
foreach (var report in _werAnalysisReports)
{
report.RemoveToolAnalysis(tool);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void UpdateInfoBox()
}
else
{
Debug.Assert(currentSelectedIndex == 0, "Expected only the first item would have a null tag");
Debug.Assert(currentSelectedIndex == 0 || currentSelectedIndex == -1, "Expected only the first item would have a null tag");
WERInfo.Text = info.Report.Description;
}
}
Expand Down

0 comments on commit 9914bc6

Please sign in to comment.