Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/12 01:27:53 (12 years ago)
Author:
abeham
Message:

#1870:

  • Added a check to remove the last newline only when there's actually a newline at the end
  • Improved speed of StringConvertibleMatrixView with respect to paste operations that would extend the number of rows and columns
File:
1 edited

Legend:

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

    r7259 r7984  
    370370        columnIndex = dataGridView.CurrentCell.ColumnIndex;
    371371      }
     372      if (Content.Rows < values.GetLength(1) + rowIndex) Content.Rows = values.GetLength(1) + rowIndex;
     373      if (Content.Columns < values.GetLength(0) + columnIndex) Content.Columns = values.GetLength(0) + columnIndex;
    372374
    373375      for (int row = 0; row < values.GetLength(1); row++) {
    374         if (row + rowIndex >= Content.Rows)
    375           Content.Rows = Content.Rows + 1;
    376376        for (int col = 0; col < values.GetLength(0); col++) {
    377           if (col + columnIndex >= Content.Columns)
    378             Content.Columns = Content.Columns + 1;
    379377          Content.SetValue(values[col, row], row + rowIndex, col + columnIndex);
    380378        }
Note: See TracChangeset for help on using the changeset viewer.