Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/01/10 13:01:50 (14 years ago)
Author:
mkommend
Message:

Corrected coloring of initial operator in OperatorGraphVisualizationInfo (ticket #1291).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphVisualizationInfo.cs

    r4722 r5008  
    7979        }
    8080      }
    81       if (original.operatorGraph.InitialOperator != null) {
    82         IOperatorShapeInfo newInitialShapeInfo = original.operatorShapeInfoMapping.GetByFirst(original.operatorGraph.InitialOperator);
    83         if (newInitialShapeInfo != null) {
    84           oldInitialShapeColor = newInitialShapeInfo.Color;
    85           newInitialShapeInfo.Color = Color.LightGreen;
    86         }
    87         oldInitialShape = InitialShape;
    88         OnInitialShapeChanged();
    89       }
    9081    }
    9182    public override IDeepCloneable Clone(Cloner cloner) {
     
    10899    private void AfterDeserialization() {
    109100      this.operatorGraph.DeserializationFinished += new EventHandler(operatorGraph_DeserializationFinished);
     101      if (oldInitialShapeColor.IsEmpty) oldInitialShapeColor = Color.LightBlue;
    110102
    111103      IOperator op;
     
    133125    private void operatorGraph_DeserializationFinished(object sender, EventArgs e) {
    134126      this.RegisterOperatorGraphEvents();
    135       if (this.operatorGraph.InitialOperator != null) {
    136         IOperatorShapeInfo newInitialShapeInfo = this.operatorShapeInfoMapping.GetByFirst(this.operatorGraph.InitialOperator);
    137         if (newInitialShapeInfo != null) {
    138           oldInitialShapeColor = newInitialShapeInfo.Color;
    139           newInitialShapeInfo.Color = Color.LightGreen;
    140         }
    141         oldInitialShape = this.InitialShape;
    142         this.OnInitialShapeChanged();
    143       }
    144127      this.operatorGraph.DeserializationFinished -= new EventHandler(operatorGraph_DeserializationFinished);
    145128    }
     
    169152
    170153    private IShapeInfo oldInitialShape;
     154    [Storable]
    171155    private Color oldInitialShapeColor;
    172156    public override IShapeInfo InitialShape {
    173157      get {
    174158        IOperator op = this.operatorGraph.InitialOperator;
    175         if (op == null)
    176           return null;
     159        if (op == null) return null;
    177160        return this.operatorShapeInfoMapping.GetByFirst(op);
    178161      }
     
    181164          this.OperatorGraph.InitialOperator = null;
    182165        else {
     166          this.oldInitialShape = InitialShape;
    183167          IOperatorShapeInfo shapeInfo = (IOperatorShapeInfo)value;
    184168          this.OperatorGraph.InitialOperator = this.operatorShapeInfoMapping.GetBySecond(shapeInfo);
Note: See TracChangeset for help on using the changeset viewer.