Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/13 16:03:44 (11 years ago)
Author:
ascheibe
Message:

#2035

  • moved EnhancedStringConvertibleMatrixView to Data.Views
  • fixed a bug that occurred when no row visibility was set which resulted in empty row headers and an exception when changing the row visibility
File:
1 moved

Legend:

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

    r9378 r9379  
    2626using System.Windows.Forms;
    2727using HeuristicLab.Common;
    28 using HeuristicLab.Data;
    29 using HeuristicLab.Data.Views;
    3028
    31 namespace HeuristicLab.Problems.DataAnalysis.Views {
     29namespace HeuristicLab.Data.Views {
    3230  public partial class EnhancedStringConvertibleMatrixView : StringConvertibleMatrixView {
    3331    private bool[] columnVisibility, rowVisibility;
     
    7270    }
    7371    protected override void UpdateRowHeaders() {
    74       if (rowVisibility == null) return;
    7572      if (Content == null) return;
    76       if (rowVisibility.Count() != dataGridView.RowCount) return;
     73      if (rowVisibility != null && rowVisibility.Count() != dataGridView.RowCount) return;
    7774
    7875      for (int index = 0; index < dataGridView.RowCount; index++) {
    7976        dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]);
    80         dataGridView.Rows[index].Visible = rowVisibility.ElementAt(virtualRowIndices[index]);
     77
     78        if (rowVisibility != null) {
     79          dataGridView.Rows[index].Visible = rowVisibility.ElementAt(virtualRowIndices[index]);
     80        } else {
     81          dataGridView.Rows[index].Visible = true;
     82        }
    8183      }
    8284    }
Note: See TracChangeset for help on using the changeset viewer.