Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4518


Ignore:
Timestamp:
09/27/10 15:23:46 (14 years ago)
Author:
mkommend
Message:

Corrected behavior of RunCollection and changed minor parts in the views (ticket #1213).

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r4477 r4518  
    279279      }
    280280
    281       bool addColumnNames = Content.ColumnNames.Any() && minRowIndex == 0;
    282       bool addRowNames = Content.RowNames.Any() && minColIndex == 0;
     281      bool addRowNames = dataGridView.AreAllCellsSelected(false);
     282      bool addColumnNames = dataGridView.AreAllCellsSelected(false);
    283283
    284284      //add colum names
     
    382382    }
    383383
    384     protected void ClearSorting() {
     384    protected virtual void ClearSorting() {
    385385      virtualRowIndizes = Enumerable.Range(0, Content.Rows).ToArray();
    386386      sortedColumnIndizes.Clear();
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs

    r4435 r4518  
    8181      DeregisterRunEvents(e.OldItems);
    8282      RegisterRunEvents(e.Items);
    83       OnContentChanged();
    8483    }
    8584    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
     
    126125        }
    127126      }
     127    }
     128
     129    protected override void ClearSorting() {
     130      base.ClearSorting();
     131      runToRowMapping = new int[Content.Count];
     132      for (int i = 0; i < runToRowMapping.Length; i++)
     133        runToRowMapping[i] = i;
    128134    }
    129135
  • trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs

    r4419 r4518  
    7272          AddResult(result.Key, result.Value);
    7373      }
    74       base.OnCollectionReset(items, oldItems);
    75       OnReset();
    7674      columnNameCache = null;
    7775      OnColumnNamesChanged();
    7876      rowNamesCache = null;
     77      base.OnCollectionReset(items, oldItems);
    7978      OnRowNamesChanged();
     79      OnReset();
     80      UpdateFiltering(false);
    8081    }
    8182    protected override void OnItemsAdded(IEnumerable<IRun> items) {
     
    8788          columnNamesChanged |= AddResult(result.Key, result.Value);
    8889      }
    89       base.OnItemsAdded(items);
    90       OnReset();
    9190      if (columnNamesChanged) {
    9291        columnNameCache = null;
     
    9493      }
    9594      rowNamesCache = null;
     95      base.OnItemsAdded(items);
    9696      OnRowNamesChanged();
    97       this.UpdateFiltering(false);
     97      OnReset();
     98      UpdateFiltering(false);
    9899    }
    99100    protected override void OnItemsRemoved(IEnumerable<IRun> items) {
     
    105106          columnNamesChanged |= RemoveResultName(resultName);
    106107      }
    107       base.OnItemsRemoved(items);
    108       OnReset();
    109108      if (columnNamesChanged) {
    110109        columnNameCache = null;
     
    112111      }
    113112      rowNamesCache = null;
     113      base.OnItemsRemoved(items);
    114114      OnRowNamesChanged();
     115      OnReset();
    115116    }
    116117
Note: See TracChangeset for help on using the changeset viewer.