- Timestamp:
- 06/06/16 12:18:12 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/NodeRectangle.cs
r13833 r13873 239 239 port2primitive.Add(port, portRectangle); 240 240 portRectangles.Add(portRectangle); 241 var parameterizedPort = port as IParameterizedPort; 242 if (parameterizedPort != null) { 243 parameterizedPort.Parameters.ItemsAdded += Parameters_ItemsAdded; 244 parameterizedPort.Parameters.ItemsRemoved += Parameters_ItemsRemoved; 245 } 241 246 } 242 247 } … … 246 251 247 252 foreach (var port in e.Items) { 253 var parameterizedPort = port as IParameterizedPort; 254 if (parameterizedPort != null) { 255 parameterizedPort.Parameters.ItemsRemoved -= Parameters_ItemsRemoved; 256 parameterizedPort.Parameters.ItemsAdded -= Parameters_ItemsAdded; 257 } 248 258 var portRectangle = port2primitive[port]; 259 portRectangles.Remove(portRectangle); 249 260 port2primitive.Remove(port); 250 portRectangles.Remove(portRectangle); 251 } 252 } 261 } 262 } 263 264 private void Parameters_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IPortParameter> e) { AdjustSize(); } 265 private void Parameters_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IPortParameter> e) { AdjustSize(); } 253 266 #endregion 254 267
Note: See TracChangeset
for help on using the changeset viewer.