Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/05/15 10:33:54 (8 years ago)
Author:
abeham
Message:

#2241: merged to stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Job.cs

    r11170 r11903  
    101101    private void RegisterEventHandlers() {
    102102      Tasks.ItemsAdded += TasksOnItemsChanged;
    103       Tasks.ItemsRemoved += TasksOnItemsChanged;
     103      Tasks.ItemsRemoved += TasksOnItemsRemoved;
    104104      Tasks.ItemsReplaced += TasksOnItemsChanged;
    105105      Tasks.CollectionReset += TasksOnItemsChanged;
     
    118118        task.Value.PropertyChanged += TaskOnPropertyChanged;
    119119        task.Value.ToStringChanged += TaskOnToStringChanged;
     120      }
     121      OnTasksChanged();
     122      OnToStringChanged();
     123    }
     124
     125    private void TasksOnItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Task>> e) {
     126      foreach (var task in e.Items) {
     127        task.Value.PropertyChanged -= TaskOnPropertyChanged;
     128        task.Value.ToStringChanged -= TaskOnToStringChanged;
    120129      }
    121130      OnTasksChanged();
Note: See TracChangeset for help on using the changeset viewer.