Changeset 2862
- Timestamp:
- 02/24/10 21:58:16 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs
r2861 r2862 87 87 88 88 foreach (IShapeInfo shapeInfo in this.VisualizationInfo.ShapeInfos) 89 this.AddShapeInfo(shapeInfo); 89 if (!this.shapeInfoShapeMapping.ContainsFirst(shapeInfo)) 90 this.AddShapeInfo(shapeInfo); 90 91 91 92 this.UpdateLayoutRoot(); … … 143 144 shape.OnEntityChange += new EventHandler<EntityEventArgs>(shape_OnEntityChange); 144 145 this.shapeInfoShapeMapping.Add(shapeInfo, shape); 146 this.shapeInfoConnectionsMapping.Add(shapeInfo, shapeInfo.ObservableConnections); 145 147 146 148 foreach (IConnector connector in shape.Connectors) … … 169 171 170 172 this.shapeInfoShapeMapping.RemoveByFirst(shapeInfo); 173 this.shapeInfoConnectionsMapping.RemoveByFirst(shapeInfo); 171 174 172 175 if (this.graphVisualization.Controller.Model.Shapes.Contains(shape)) { … … 177 180 private void RegisterShapeInfoEvents(IShapeInfo shapeInfo) { 178 181 shapeInfo.Changed += new ChangedEventHandler(shapeInfo_Changed); 179 180 this.shapeInfoConnectionsMapping.Add(shapeInfo, shapeInfo.ObservableConnections);181 182 shapeInfo.ObservableConnections.ItemsAdded += new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsAdded); 182 183 shapeInfo.ObservableConnections.ItemsRemoved += new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsRemoved); … … 187 188 private void DeregisterShapeInfoEvents(IShapeInfo shapeInfo) { 188 189 shapeInfo.Changed -= new ChangedEventHandler(shapeInfo_Changed); 189 190 this.shapeInfoConnectionsMapping.RemoveByFirst(shapeInfo);191 190 shapeInfo.ObservableConnections.ItemsAdded -= new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsAdded); 192 191 shapeInfo.ObservableConnections.ItemsRemoved -= new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsRemoved);
Note: See TracChangeset
for help on using the changeset viewer.