Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/09/14 15:11:16 (11 years ago)
Author:
bburlacu
Message:

#1772: Fixed persistence errors in the GenealogyAnalyzer and the instrumented operators, tweaked display code in the GenealogyGraphChart.

File:
1 edited

Legend:

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

    r10827 r10830  
    5353
    5454    private void Clear() {
    55       if (nodeMap == null)
    56         nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>();
    57       else nodeMap.Clear();
    58 
    59       if (arcMap == null)
    60         arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
    61       else arcMap.Clear();
     55      nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>();
     56      arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
    6257
    6358      Chart.Group.Clear();
     
    118113        foreach (var node in nodes) {
    119114          var brush = new SolidBrush(node.GetColor());
    120 
    121115          var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + diameter, y + diameter, defaultPen, brush) {
    122116            Data = node,
     
    145139          var pen = Pens.Transparent;
    146140          var visualArc = AddArc(Chart, visualParent, visualNode, pen);
    147           if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode)))
     141          if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode))) {
    148142            arcMap.Add(Tuple.Create(visualParent, visualNode), visualArc);
     143          }
    149144        }
    150145      }
     
    233228      brush.Color = node.Data.GetColor();
    234229      var arcs = arcSelector(node);
     230      var pen = new Pen(Color.Transparent);
    235231      foreach (var arc in arcs) {
    236232        var source = arc.Source.Data;
     
    238234        var start = new Point((int)arc.Start.X, (int)arc.Start.Y);
    239235        var end = new Point((int)arc.End.X, (int)arc.End.Y);
    240         arc.Pen = new Pen(Color.Transparent);
     236        arc.Pen = pen;
    241237        arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor());
    242238        DrawLineage(nodeSelector(arc), arcSelector, nodeSelector);
     
    273269          primitive.Pen = Pens.Transparent;
    274270        } else if (primitive is VisualGenealogyGraphNode) {
    275           primitive.Brush = Brushes.Transparent;
    276           primitive.Pen = Pens.DarkGray;
     271          primitive.Brush = new SolidBrush(Color.Transparent);
     272          primitive.Pen = new Pen(Color.DarkGray);
    277273        }
    278274      }
Note: See TracChangeset for help on using the changeset viewer.