Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7979 for trunk/sources


Ignore:
Timestamp:
06/11/12 11:33:39 (12 years ago)
Author:
mkommend
Message:

#1869: Corrected introduced bug in DataTableView concerning adding of DataRows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r7977 r7979  
    6868      Content.Rows.ItemsReplaced += new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced);
    6969      Content.Rows.CollectionReset += new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset);
    70       foreach (DataRow row in Content.Rows)
    71         RegisterDataRowEvents(row);
    7270    }
    7371
     
    137135    }
    138136
     137    protected virtual void RemoveDataRows(IEnumerable<DataRow> rows) {
     138      foreach (var row in rows) {
     139        DeregisterDataRowEvents(row);
     140        Series series = chart.Series[row.Name];
     141        chart.Series.Remove(series);
     142        if (invisibleSeries.Contains(series))
     143          invisibleSeries.Remove(series);
     144      }
     145      RecalculateAxesScale(chart.ChartAreas[0]);
     146    }
     147
    139148    private void ConfigureSeries(Series series, DataRow row) {
    140149      RemoveCustomPropertyIfExists(series, "PointWidth");
     
    263272      double yZoomInterval = Math.Pow(10, digits);
    264273      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
    265     }
    266 
    267     protected virtual void RemoveDataRows(IEnumerable<DataRow> rows) {
    268       foreach (var row in rows) {
    269         DeregisterDataRowEvents(row);
    270         Series series = chart.Series[row.Name];
    271         chart.Series.Remove(series);
    272         if (invisibleSeries.Contains(series))
    273           invisibleSeries.Remove(series);
    274       }
    275       RecalculateAxesScale(chart.ChartAreas[0]);
    276274    }
    277275
Note: See TracChangeset for help on using the changeset viewer.