Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5070


Ignore:
Timestamp:
12/07/10 16:58:11 (14 years ago)
Author:
abeham
Message:

#1324

  • Fixed event deregistration in ItemArrayView and ItemListView
Location:
trunk/sources/HeuristicLab.Core.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs

    r4300 r5070  
    6868      Content.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsMoved);
    6969      Content.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_CollectionReset);
     70      foreach (T item in Content) {
     71        item.ItemImageChanged -= new EventHandler(Item_ItemImageChanged);
     72        item.ToStringChanged -= new EventHandler(Item_ToStringChanged);
     73      }
    7074      base.DeregisterContentEvents();
    7175    }
     
    136140        try {
    137141          return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    138         }
    139         catch (Exception ex) {
     142        } catch (Exception ex) {
    140143          ErrorHandling.ShowErrorDialog(this, ex);
    141144        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r4300 r5070  
    7070      Content.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_ItemsMoved);
    7171      Content.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<T>>(Content_CollectionReset);
     72      foreach (T item in Content) {
     73        item.ItemImageChanged -= new EventHandler(Item_ItemImageChanged);
     74        item.ToStringChanged -= new EventHandler(Item_ToStringChanged);
     75      }
    7276      base.DeregisterContentEvents();
    7377    }
     
    139143        try {
    140144          return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    141         }
    142         catch (Exception ex) {
     145        } catch (Exception ex) {
    143146          ErrorHandling.ShowErrorDialog(this, ex);
    144147        }
Note: See TracChangeset for help on using the changeset viewer.