Changeset 7785 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
- Timestamp:
- 05/09/12 09:56:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
r7779 r7785 177 177 foreach (var node in ancestors.SelectMany(n => _visualNodeMap[n])) { 178 178 node.Brush = new SolidBrush(node.ToColor()); 179 if (node.IncomingArcs != null && node == _visualNodeMap[node.Data].First()) 179 if (node.IncomingArcs != null && node == _visualNodeMap[node.Data].First()) { 180 180 foreach (var arc in node.IncomingArcs) { 181 181 if (arc.Source.Data == node.Data) continue; … … 183 183 var end = new Point((int)arc.End.X, (int)arc.End.Y); 184 184 arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor()); 185 if (node.Data.CutpointIndex == -1) { // if the cut index wasn't computed yet 185 if (node.Data.CutpointIndex == -1) { 186 // if the cut index wasn't computed yet 186 187 var parent = arc.Source.Data.Data as ISymbolicExpressionTree; 187 188 var child = node.Data.Data as ISymbolicExpressionTree; … … 189 190 } 190 191 } 192 } 191 193 } 192 194 // highlight the descendants … … 208 210 Chart.UpdateEnabled = true; 209 211 Chart.EnforceUpdate(); 210 if (_selectedGenealogyGraphNode != null) /* emit clicked event */ OnGenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e); 212 if (_selectedGenealogyGraphNode != null) 213 /* emit clicked event */ 214 OnGenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e); 211 215 } 212 216 } … … 238 242 var e1 = parent.IterateNodesPostfix().GetEnumerator(); 239 243 var e2 = child.IterateNodesPostfix().GetEnumerator(); 240 int pos = -1;241 var comparer = new SymbolicExpressionTree GenealogyGraph.SymbolicExpressionTreeNodeComparer(0);244 int pos = 0; 245 var comparer = new SymbolicExpressionTreeNodeComparer((int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact); 242 246 while (e1.MoveNext() && e2.MoveNext() && comparer.Equals(e1.Current, e2.Current)) ++pos; 247 if (pos == 0) return -1; 248 if (pos == child.Length) return 0; 243 249 return pos; 250 //return pos == 0 ? -1 : pos; 244 251 } 245 252 }
Note: See TracChangeset
for help on using the changeset viewer.