Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/16/11 18:25:47 (12 years ago)
Author:
mkommend
Message:

#1715: Added type name to operator shapes.

File:
1 edited

Legend:

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

    r6036 r7199  
    3838    [StorableConstructor]
    3939    protected OperatorShapeInfo(bool deserializing) : base(deserializing) { }
     40    [StorableHook(HookType.AfterDeserialization)]
     41    private void AfterDeserialization() {
     42      if (string.IsNullOrEmpty(this.typeName))
     43        typeName = title;
     44    }
    4045    protected OperatorShapeInfo(OperatorShapeInfo original, Cloner cloner)
    4146      : base(original, cloner) {
     
    4550      lineWidth = original.lineWidth;
    4651      title = original.title;
     52      typeName = original.typeName;
    4753
    4854      //mkommend: necessary because cloning a Bitmap is not threadsafe
     
    129135
    130136    [Storable]
     137    private string typeName;
     138    public string TypeName {
     139      get { return this.typeName; }
     140      set {
     141        if (this.typeName != value) {
     142          this.typeName = value;
     143          this.OnChanged();
     144        }
     145      }
     146    }
     147
     148    [Storable]
    131149    private Color color;
    132150    public Color Color {
Note: See TracChangeset for help on using the changeset viewer.