Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10873


Ignore:
Timestamp:
05/21/14 13:07:40 (11 years ago)
Author:
sbreuer
Message:
  • Bugfixing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/Utils/FindPreprocessingItemsIterator.cs

    r10870 r10873  
    3737    public void SetStartCell(int columnIndex, int rowIndex) {
    3838      Tuple<int, int> startCell = GetNextFoundCell(columnIndex, rowIndex);
    39       int tmpColumnIndex = columnIndex + 1;
    40       while (startCell == null && tmpColumnIndex != columnIndex) {
    41         if (!items.ContainsKey(tmpColumnIndex)) {
    42           tmpColumnIndex = 0;
     39      if (startCell == null) {
     40        int tmpColumnIndex = columnIndex;
     41        do {
     42          ++tmpColumnIndex;
     43          if (!items.ContainsKey(tmpColumnIndex)) {
     44            tmpColumnIndex = 0;
     45          }
     46          startCell = GetNextFoundCell(tmpColumnIndex, 0);
     47        } while (startCell == null && tmpColumnIndex != columnIndex);
     48
     49        if (startCell == null && tmpColumnIndex == columnIndex && rowIndex != 0) {
     50          startCell = GetNextFoundCell(columnIndex, 0);
    4351        }
    44         startCell = GetNextFoundCell(tmpColumnIndex, 0);
    45         ++tmpColumnIndex;
    46       }
    47       if (startCell == null && tmpColumnIndex == columnIndex && rowIndex != 0) {
    48         startCell = GetNextFoundCell(columnIndex, 0);
    4952      }
    5053      currentCell = startCell;
     
    9093
    9194    public void Reset() {
    92       currentCell = new Tuple<int, int>(0, 0);
     95      SetStartCell(0, 0);
    9396      if (!CurrentCellExists()) {
    9497        MoveNext();
Note: See TracChangeset for help on using the changeset viewer.