Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7161


Ignore:
Timestamp:
12/09/11 13:11:09 (13 years ago)
Author:
swagner
Message:

Fixed synchronization of itemListViewItemMapping when moving items (#1589)

Location:
trunk/sources/HeuristicLab.Core.Views/3.3
Files:
2 edited

Legend:

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

    r5928 r7161  
    400400        foreach (IndexedItem<T> item in e.Items) {
    401401          ListViewItem listViewItem = itemsListView.Items[item.Index];
     402          if (listViewItem.Tag != null)
     403            itemListViewItemMapping[(T)listViewItem.Tag].Remove(listViewItem);
    402404          listViewItem.Tag = item.Value;
     405          if (listViewItem.Tag != null)
     406            itemListViewItemMapping[item.Value].Add(listViewItem);
    403407          UpdateListViewItemImage(listViewItem);
    404408          UpdateListViewItemText(listViewItem);
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r6527 r7161  
    441441        foreach (IndexedItem<T> item in e.Items) {
    442442          ListViewItem listViewItem = itemsListView.Items[item.Index];
     443          if (listViewItem.Tag != null)
     444            itemListViewItemMapping[(T)listViewItem.Tag].Remove(listViewItem);
    443445          listViewItem.Tag = item.Value;
     446          if (listViewItem.Tag != null)
     447            itemListViewItemMapping[item.Value].Add(listViewItem);
    444448          UpdateListViewItemImage(listViewItem);
    445449          UpdateListViewItemText(listViewItem);
Note: See TracChangeset for help on using the changeset viewer.