Changeset 12599 for trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionChartAggregationView.cs
- Timestamp:
- 07/06/15 13:52:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionChartAggregationView.cs
r12012 r12599 168 168 169 169 private void UpdateRuns(IEnumerable<IRun> runs) { 170 if (suppressUpdates) return;171 170 foreach (var run in runs) { 172 171 //update color 173 foreach (var dataRow in runMapping[run]) { 174 dataRow.VisualProperties.Color = run.Color; 172 if (!runMapping.ContainsKey(run)) { 173 runMapping[run] = ExtractDataRowsFromRun(run).ToList(); 174 RegisterRunEvents(run); 175 } else { 176 foreach (var dataRow in runMapping[run]) { 177 dataRow.VisualProperties.Color = run.Color; 178 } 175 179 } 176 //update visibility - remove and add all rows to keep the same order as before177 combinedDataTable.Rows.Clear();178 combinedDataTable.Rows.AddRange(runMapping.Where(mapping => mapping.Key.Visible).SelectMany(mapping => mapping.Value));179 }180 } 181 //update visibility - remove and add all rows to keep the same order as before 182 combinedDataTable.Rows.Clear(); 183 combinedDataTable.Rows.AddRange(runMapping.Where(mapping => mapping.Key.Visible).SelectMany(mapping => mapping.Value)); 180 184 } 181 185 182 186 private IEnumerable<DataRow> ExtractDataRowsFromRun(IRun run) { 183 187 var resultName = (string)dataTableComboBox.SelectedItem; 188 if (string.IsNullOrEmpty(resultName)) yield break; 189 184 190 var rowName = (string)dataRowComboBox.SelectedItem; 185 191 if (!run.Results.ContainsKey(resultName)) yield break;
Note: See TracChangeset
for help on using the changeset viewer.