Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/12 12:10:38 (12 years ago)
Author:
sforsten
Message:

#1292: implemented changes suggested by mkommend in comment:49:ticket:1292

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs

    r8874 r8880  
    7272    }
    7373    protected override void UpdateRowHeaders() {
    74       if (rowVisibility != null && Content != null && rowVisibility.Count() == dataGridView.RowCount) {
    75         int[] realRowIndex = Enumerable.Range(0, Content.Rows).ToArray();
    76         int[] helper = new int[virtualRowIndices.Length];
    77         Array.Copy(virtualRowIndices, helper, virtualRowIndices.Length);
    78         Array.Sort(helper, realRowIndex);
    79         for (int i = 0; i < dataGridView.RowCount; i++) {
    80           dataGridView.Rows[realRowIndex[i]].Visible = rowVisibility.ElementAt(i);
    81         }
     74      if (rowVisibility == null) return;
     75      if (Content == null) return;
     76      if (rowVisibility.Count() != dataGridView.RowCount) return;
     77
     78      for (int index = 0; index < dataGridView.RowCount; index++) {
     79        dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]);
     80        dataGridView.Rows[index].Visible = rowVisibility.ElementAt(virtualRowIndices[index]);
    8281      }
    83       base.UpdateRowHeaders();
    8482    }
    8583
Note: See TracChangeset for help on using the changeset viewer.