Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9692 for trunk


Ignore:
Timestamp:
07/01/13 16:18:08 (11 years ago)
Author:
mkommend
Message:

#2075: Corrected changing of element names if a ValueType- or StringArray is resized.

Location:
trunk/sources/HeuristicLab.Data/3.3
Files:
2 edited

Legend:

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

    r9657 r9692  
    6767          while (elementNames.Count > value)
    6868            elementNames.RemoveAt(elementNames.Count - 1);
    69           while (elementNames.Count < value)
    70             elementNames.Add("Element " + elementNames.Count);
     69          if (elementNames.Any()) {
     70            while (elementNames.Count < value)
     71              elementNames.Add("Element " + elementNames.Count);
     72          }
    7173          OnElementNamesChanged();
    7274          OnReset();
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs

    r9657 r9692  
    6969          while (elementNames.Count > value)
    7070            elementNames.RemoveAt(elementNames.Count - 1);
    71           while (elementNames.Count < value)
    72             elementNames.Add("Element " + elementNames.Count);
     71          if (elementNames.Any()) {
     72            while (elementNames.Count < value)
     73              elementNames.Add("Element " + elementNames.Count);
     74          }
    7375          OnElementNamesChanged();
    7476          OnReset();
Note: See TracChangeset for help on using the changeset viewer.