Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/14 17:23:51 (10 years ago)
Author:
bburlacu
Message:

#1772: Improved FragmentGraphView.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs

    r10650 r10730  
    196196        // new node has been selected, clean up
    197197        Chart.UpdateEnabled = false;
    198         if (ModifierKeys != Keys.Shift)
     198        if (ModifierKeys != Keys.Shift) {
    199199          // clear colors
    200200          ClearPrimitives();
     201        }
    201202        // use a rectangle to highlight the currently selected genealogy graph node
    202203        var gNode = SelectedVisualNode.Data;
     
    222223    #endregion
    223224
    224     private void DrawLineage(VisualGenealogyGraphNode node, Func<VisualGenealogyGraphNode, IEnumerable<VisualGenealogyGraphArc>> arcSelector, Func<VisualGenealogyGraphArc, VisualGenealogyGraphNode> nodeSelector) {
     225    private static void DrawLineage(VisualGenealogyGraphNode node, Func<VisualGenealogyGraphNode, IEnumerable<VisualGenealogyGraphArc>> arcSelector, Func<VisualGenealogyGraphArc, VisualGenealogyGraphNode> nodeSelector) {
    225226      if (node.Brush != null) return;
    226227      node.Brush = new SolidBrush(node.Data.GetColor());
    227       var arcs = arcSelector(node);
    228       if (arcs == null) return;
    229 
     228      var arcs = arcSelector(node).ToList();
    230229      foreach (var arc in arcs) {
    231230        var source = arc.Source.Data;
     
    235234        arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor());
    236235        arc.Pen.Color = Color.Transparent;
    237         //        arc.Pen.FontBrush = new SolidBrush(Color.DarkGray);
     236        //        if (arc == arcs[0]) { arc.Pen.Width = 2; } // mark connection to the root parent
    238237        DrawLineage(nodeSelector(arc), arcSelector, nodeSelector);
    239238      }
Note: See TracChangeset for help on using the changeset viewer.