Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2896


Ignore:
Timestamp:
03/01/10 13:08:04 (15 years ago)
Author:
mkommend
Message:

added handling of operator name changes (ticket #867)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/GraphVisualizationInfo.cs

    r2893 r2896  
    187187    }
    188188
     189    private void OperatorNameChanged(object sender, EventArgs e) {
     190      IOperator op = (IOperator)sender;
     191      IShapeInfo shapeInfo = this.shapeInfoMapping.GetByFirst(op);
     192      OperatorShapeInfo operatorShapeInfo = shapeInfo as OperatorShapeInfo;
     193      if (operatorShapeInfo != null)
     194        operatorShapeInfo.Title = op.Name;
     195    }
     196
    189197    private void Operators_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IOperator> e) {
    190198      foreach (IOperator op in e.Items)
     
    207215      op.Parameters.ItemsReplaced += new CollectionItemsChangedEventHandler<IParameter>(Parameters_ItemsReplaced);
    208216      op.Parameters.CollectionReset += new CollectionItemsChangedEventHandler<IParameter>(Parameters_CollectionReset);
    209     }
     217      op.NameChanged += new EventHandler(OperatorNameChanged);
     218    }
     219
    210220    private void DeregisterOperatorEvents(IOperator op) {
    211221      op.Parameters.ItemsAdded -= new CollectionItemsChangedEventHandler<IParameter>(Parameters_ItemsAdded);
     
    213223      op.Parameters.ItemsReplaced -= new CollectionItemsChangedEventHandler<IParameter>(Parameters_ItemsReplaced);
    214224      op.Parameters.CollectionReset -= new CollectionItemsChangedEventHandler<IParameter>(Parameters_CollectionReset);
     225      op.NameChanged -= new EventHandler(OperatorNameChanged);
    215226    }
    216227    #endregion
Note: See TracChangeset for help on using the changeset viewer.