Browse Source

Fix #332: Unit Tests Panel: "All Tests" disappeared

filemodels
Daniel Grunwald 12 years ago
parent
commit
22bfe504a8
  1. 11
      src/AddIns/Analysis/UnitTesting/Pad/TestTreeView.cs

11
src/AddIns/Analysis/UnitTesting/Pad/TestTreeView.cs

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.NRefactory.TypeSystem;
@ -52,15 +53,19 @@ namespace ICSharpCode.UnitTesting @@ -52,15 +53,19 @@ namespace ICSharpCode.UnitTesting
testSolution = value;
if (testSolution != null) {
this.Root = new UnitTestNode(testSolution);
this.Root.Children.CollectionChanged += delegate {
this.ShowRoot = this.Root != null && this.Root.Children.Count > 1;
};
this.Root.Children.CollectionChanged += OnRootChildrenCollectionChanged;
OnRootChildrenCollectionChanged(null, null);
} else {
this.Root = null;
}
}
}
void OnRootChildrenCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
this.ShowRoot = this.Root != null && this.Root.Children.Count > 1;
}
public TestTreeView()
{
this.ShowRoot = false;

Loading…
Cancel
Save