Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/04/14 18:35:25 (10 years ago)
Author:
abeham
Message:

#2120: merged to stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs

    r11170 r11522  
    2323using System.Collections;
    2424using System.Collections.Generic;
     25using System.ComponentModel;
    2526using System.Drawing;
    2627using System.Linq;
     
    7980      item.ItemImageChanged -= new EventHandler(Item_ItemImageChanged);
    8081      item.ToStringChanged -= new EventHandler(Item_ToStringChanged);
    81       item.Changed -= new EventHandler(Item_Changed);
     82      item.PropertyChanged -= Item_PropertyChanged;
    8283    }
    8384    private void RegisterItemEvents(IRun item) {
    8485      item.ItemImageChanged += new EventHandler(Item_ItemImageChanged);
    8586      item.ToStringChanged += new EventHandler(Item_ToStringChanged);
    86       item.Changed += new EventHandler(Item_Changed);
     87      item.PropertyChanged += Item_PropertyChanged;
    8788    }
    8889
     
    385386      try {
    386387        RunCollection.Modify();
    387       }
    388       finally {
     388      } finally {
    389389        ReadOnly = false;
    390390      }
     
    462462      }
    463463    }
    464     private void Item_Changed(object sender, EventArgs e) {
     464    private void Item_PropertyChanged(object sender, PropertyChangedEventArgs e) {
    465465      if (InvokeRequired)
    466         this.Invoke(new EventHandler(Item_Changed), sender, e);
     466        this.Invoke((Action<object, PropertyChangedEventArgs>)Item_PropertyChanged, sender, e);
    467467      else {
    468468        IRun run = (IRun)sender;
    469         UpdateRun(run);
     469        if (e.PropertyName == "Color" || e.PropertyName == "Visible")
     470          UpdateRun(run);
    470471      }
    471472    }
Note: See TracChangeset for help on using the changeset viewer.