Changeset 15087


Ignore:
Timestamp:
06/29/17 11:47:10 (4 months ago)
Author:
mkommend
Message:

#2783: Reverse merge of unrelated changes r15086 in CheckedItemListView.

File:
1 edited

Legend:

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

    r15086 r15087  
    106106      var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as ICheckedItemList<T>;
    107107      if (data != null)
    108         validDragOperation = true;
     108        validDragOperation = Content.Select(x => x.ToString()).SequenceEqual(data.Select(x => x.ToString()));
    109109      else
    110110        base.itemsListView_DragEnter(sender, e);
     
    126126      var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as ICheckedItemList<T>;
    127127      if (data != null) {
    128         for (int i = 0; i < data.Count; i++) {
    129           var dataItem = data[i];
    130           var contentItem = Content.FirstOrDefault(ci => ci.ToString() == dataItem.ToString());
    131           if (contentItem == null) continue;
    132           Content.SetItemCheckedState(contentItem, data.ItemChecked(dataItem));
     128        for (int i = 0; i < Content.Count; i++) {
     129          Content.SetItemCheckedState(Content[i], data.ItemChecked(data[i]));
    133130        }
    134131      } else
Note: See TracChangeset for help on using the changeset viewer.