Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5928


Ignore:
Timestamp:
04/02/11 01:52:19 (14 years ago)
Author:
swagner
Message:

Prevented disappearing of runs in an optimizer when moving the optimizer up or down in an experiment (#1445)

Location:
trunk/sources
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableArray.cs

    r5445 r5928  
    2626  public interface IObservableArray<T> : IList<T>, INotifyObservableArrayItemsChanged<T>, INotifyPropertyChanged {
    2727    int Length { get; }
     28
     29    void Reverse();
     30    void Reverse(int index, int count);
    2831  }
    2932}
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableList.cs

    r5445 r5928  
    2323
    2424namespace HeuristicLab.Collections {
    25   public interface IObservableList<T> : IList<T>, IObservableCollection<T>, INotifyObservableListItemsChanged<T> { }
     25  public interface IObservableList<T> : IList<T>, IObservableCollection<T>, INotifyObservableListItemsChanged<T> {
     26    void Reverse();
     27    void Reverse(int index, int count);
     28  }
    2629}
  • trunk/sources/HeuristicLab.Collections/3.3/ReadOnlyObservableArray.cs

    r5445 r5928  
    9898      throw new NotSupportedException();
    9999    }
     100
     101    void IObservableArray<T>.Reverse() {
     102      throw new NotSupportedException();
     103    }
     104    void IObservableArray<T>.Reverse(int index, int count) {
     105      throw new NotSupportedException();
     106    }
    100107    #endregion
    101108
  • trunk/sources/HeuristicLab.Collections/3.3/ReadOnlyObservableList.cs

    r5445 r5928  
    9393
    9494    void ICollection<T>.Clear() {
     95      throw new NotSupportedException();
     96    }
     97
     98    void IObservableList<T>.Reverse() {
     99      throw new NotSupportedException();
     100    }
     101    void IObservableList<T>.Reverse(int index, int count) {
    95102      throw new NotSupportedException();
    96103    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs

    r5839 r5928  
    337337      if (itemsListView.SelectedItems.Count == 1) {
    338338        int index = itemsListView.SelectedIndices[0];
    339         T item = Content[index - 1];
    340         Content[index - 1] = Content[index];
     339        Content.Reverse(index - 1, 2);
    341340        itemsListView.Items[index].Selected = false;
    342341        itemsListView.Items[index - 1].Selected = true;
    343         Content[index] = item;
    344342      }
    345343    }
     
    347345      if (itemsListView.SelectedItems.Count == 1) {
    348346        int index = itemsListView.SelectedIndices[0];
    349         T item = Content[index + 1];
    350         Content[index + 1] = Content[index];
     347        Content.Reverse(index, 2);
    351348        itemsListView.Items[index].Selected = false;
    352349        itemsListView.Items[index + 1].Selected = true;
    353         Content[index] = item;
    354350      }
    355351    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r5839 r5928  
    352352      if (itemsListView.SelectedItems.Count == 1) {
    353353        int index = itemsListView.SelectedIndices[0];
    354         T item = Content[index - 1];
    355         Content[index - 1] = Content[index];
     354        Content.Reverse(index - 1, 2);
    356355        itemsListView.Items[index].Selected = false;
    357356        itemsListView.Items[index - 1].Selected = true;
    358         Content[index] = item;
    359357      }
    360358    }
     
    362360      if (itemsListView.SelectedItems.Count == 1) {
    363361        int index = itemsListView.SelectedIndices[0];
    364         T item = Content[index + 1];
    365         Content[index + 1] = Content[index];
     362        Content.Reverse(index, 2);
    366363        itemsListView.Items[index].Selected = false;
    367364        itemsListView.Items[index + 1].Selected = true;
    368         Content[index] = item;
    369365      }
    370366    }
Note: See TracChangeset for help on using the changeset viewer.