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/StringConvertibleArrayView.cs

    r7318 r7984  
    195195    }
    196196    private string[] SplitClipboardString(string clipboardText) {
    197       clipboardText = clipboardText.Remove(clipboardText.Length - Environment.NewLine.Length);  //remove last newline constant
     197      if (clipboardText.EndsWith(Environment.NewLine))
     198        clipboardText = clipboardText.Remove(clipboardText.Length - Environment.NewLine.Length);  //remove last newline constant
    198199      return clipboardText.Split(new string[] { Environment.NewLine, "\t" }, StringSplitOptions.None);
    199200    }
Note: See TracChangeset for help on using the changeset viewer.