Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17118


Ignore:
Timestamp:
07/08/19 17:38:12 (5 years ago)
Author:
abeham
Message:

#2949: Fixed sorting in ItemCollectionView

  • Sorting was broken in r17007:17008. It worked previously, because AutoResize probably put the control in a different mode (very likely that it incurred some painting). After removing AutoResize the control is now in a different mode where it doesn't actually sort the items. The items are now added in sorted order instead of inserting them in their given order and then sorting them in the view. This should be faster and have the same effect.
File:
1 edited

Legend:

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

    r17008 r17118  
    104104      if (Content != null) {
    105105        Caption += " (" + Content.GetType().Name + ")";
    106         foreach (T item in Content)
     106        foreach (T item in Content.OrderBy(x => x.ToString()))
    107107          AddListViewItem(CreateListViewItem(item));
    108108        AdjustListViewColumnSizes();
    109         SortItemsListView(SortOrder.Ascending);
    110109      }
    111110    }
Note: See TracChangeset for help on using the changeset viewer.