- Timestamp:
- 12/01/10 13:01:50 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs
r4722 r5008 95 95 } 96 96 97 //mkommend: IMPORTANT DO NOT REMOVE THIS PRIVATEEVENT97 //mkommend: IMPORTANT DO NOT REMOVE THIS EVENT 98 98 //needed to register OperatorGraph events in GraphVisualizationInfo 99 99 public event EventHandler DeserializationFinished; … … 106 106 private void AfterDeserialization() { 107 107 Initialize(); 108 OnOperatorGraphDeserializationFinished(); 108 109 } 109 110 private void Initialize() { 110 111 RegisterOperatorsEvents(); 111 OnOperatorGraphDeserializationFinished();112 112 } 113 113 -
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphVisualizationInfo.cs
r4722 r5008 79 79 } 80 80 } 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 }90 81 } 91 82 public override IDeepCloneable Clone(Cloner cloner) { … … 108 99 private void AfterDeserialization() { 109 100 this.operatorGraph.DeserializationFinished += new EventHandler(operatorGraph_DeserializationFinished); 101 if (oldInitialShapeColor.IsEmpty) oldInitialShapeColor = Color.LightBlue; 110 102 111 103 IOperator op; … … 133 125 private void operatorGraph_DeserializationFinished(object sender, EventArgs e) { 134 126 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 }144 127 this.operatorGraph.DeserializationFinished -= new EventHandler(operatorGraph_DeserializationFinished); 145 128 } … … 169 152 170 153 private IShapeInfo oldInitialShape; 154 [Storable] 171 155 private Color oldInitialShapeColor; 172 156 public override IShapeInfo InitialShape { 173 157 get { 174 158 IOperator op = this.operatorGraph.InitialOperator; 175 if (op == null) 176 return null; 159 if (op == null) return null; 177 160 return this.operatorShapeInfoMapping.GetByFirst(op); 178 161 } … … 181 164 this.OperatorGraph.InitialOperator = null; 182 165 else { 166 this.oldInitialShape = InitialShape; 183 167 IOperatorShapeInfo shapeInfo = (IOperatorShapeInfo)value; 184 168 this.OperatorGraph.InitialOperator = this.operatorShapeInfoMapping.GetBySecond(shapeInfo);
Note: See TracChangeset
for help on using the changeset viewer.