Changeset 5839


Ignore:
Timestamp:
03/28/11 16:15:41 (11 years ago)
Author:
swagner
Message:

Fixed NullReferenceException in collection views when updating the item image of a hidden item (#1377)

Location:
trunk/sources
Files:
5 edited

Legend:

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

    r5837 r5839  
    384384        ListViewItem listViewItem = itemListViewItemMapping[item];
    385385        int i = listViewItem.ImageIndex;
    386         listViewItem.ImageList.Images[i] = item.ItemImage;
     386        listView.SmallImageList.Images[i] = item.ItemImage;
    387387        listViewItem.ImageIndex = -1;
    388388        listViewItem.ImageIndex = i;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs

    r5837 r5839  
    203203      T item = listViewItem.Tag as T;
    204204      int i = listViewItem.ImageIndex;
    205       listViewItem.ImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
     205      itemsListView.SmallImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
    206206      listViewItem.ImageIndex = -1;
    207207      listViewItem.ImageIndex = i;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r5837 r5839  
    184184      T item = listViewItem.Tag as T;
    185185      int i = listViewItem.ImageIndex;
    186       listViewItem.ImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
     186      itemsListView.SmallImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
    187187      listViewItem.ImageIndex = -1;
    188188      listViewItem.ImageIndex = i;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r5837 r5839  
    207207      T item = listViewItem.Tag as T;
    208208      int i = listViewItem.ImageIndex;
    209       listViewItem.ImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
     209      itemsListView.SmallImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
    210210      listViewItem.ImageIndex = -1;
    211211      listViewItem.ImageIndex = i;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs

    r5837 r5839  
    204204      IRun item = listViewItem.Tag as IRun;
    205205      int i = listViewItem.ImageIndex;
    206       listViewItem.ImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
     206      itemsListView.SmallImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
    207207      listViewItem.ImageIndex = -1;
    208208      listViewItem.ImageIndex = i;
Note: See TracChangeset for help on using the changeset viewer.