Changeset 11007 for trunk/sources
- Timestamp:
- 06/12/14 11:32:32 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
r10767 r11007 122 122 Invoke(new EventHandler(Content_Reset), sender, e); 123 123 else { 124 this.categoricalMapping.Clear();125 124 UpdateDataPoints(); 126 125 UpdateAxisLabels(); … … 189 188 190 189 private void UpdateDataPoints() { 190 this.categoricalMapping.Clear(); 191 191 this.chart.Series.Clear(); 192 192 this.seriesCache.Clear(); … … 325 325 } 326 326 } 327 private double GetCategoricalValue(int dimension, string value) {327 private double? GetCategoricalValue(int dimension, string value) { 328 328 if (!this.categoricalMapping.ContainsKey(dimension)) { 329 329 this.categoricalMapping[dimension] = new Dictionary<object, double>(); … … 336 336 } 337 337 } 338 if (!this.categoricalMapping[dimension].ContainsKey(value)) return null; 338 339 return this.categoricalMapping[dimension][value]; 339 340 } 340 private double GetValue(IRun run, AxisDimension axisDimension) {341 double value = double.NaN;341 private double? GetValue(IRun run, AxisDimension axisDimension) { 342 double? value = double.NaN; 342 343 switch (axisDimension) { 343 344 case AxisDimension.Color: { -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
r9910 r11007 56 56 private bool suppressUpdates = false; 57 57 58 private RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true };58 private readonly RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true }; 59 59 60 60 public RunCollectionBubbleChartView() { … … 153 153 if (suppressUpdates) return; 154 154 155 foreach (var run in Content) UpdateRun(run); 156 UpdateMarkerSizes(); 157 UpdateCursorInterval(); 158 chart.ChartAreas[0].RecalculateAxesScale(); 155 UpdateDataPoints(); 159 156 UpdateAxisLabels(); 160 157 } … … 190 187 protected override void OnContentChanged() { 191 188 base.OnContentChanged(); 192 this.categoricalMapping.Clear();193 189 UpdateComboBoxes(); 194 190 UpdateDataPoints(); 195 191 UpdateCaption(); 196 RebuildInverseIndex();197 192 } 198 193 … … 267 262 Invoke(new EventHandler(Content_Reset), sender, e); 268 263 else { 269 this.categoricalMapping.Clear();270 RebuildInverseIndex();271 264 UpdateDataPoints(); 272 265 UpdateAxisLabels(); … … 278 271 series.Points.Clear(); 279 272 runToDataPointMapping.Clear(); 273 categoricalMapping.Clear(); 280 274 selectedRuns.Clear(); 275 RebuildInverseIndex(); 281 276 282 277 chart.ChartAreas[0].AxisX.IsMarginVisible = xAxisValue != AxisDimension.Index.ToString(); … … 438 433 } 439 434 } 440 private double GetCategoricalValue(int dimension, string value) {435 private double? GetCategoricalValue(int dimension, string value) { 441 436 if (!this.categoricalMapping.ContainsKey(dimension)) { 442 437 this.categoricalMapping[dimension] = new Dictionary<object, double>(); … … 449 444 } 450 445 } 446 if (!this.categoricalMapping[dimension].ContainsKey(value)) return null; 451 447 return this.categoricalMapping[dimension][value]; 452 448 } … … 723 719 } 724 720 private void hideRunsToolStripMenuItem_Click(object sender, EventArgs e) { 725 HideRuns(selectedRuns); 721 //ToList is necessary to prevent lazy evaluation 722 HideRuns(selectedRuns.ToList()); 726 723 //could not use ClearSelectedRuns as the runs are not visible anymore 727 724 selectedRuns.Clear(); 728 725 } 729 726 private void hideRunsButton_Click(object sender, EventArgs e) { 730 HideRuns(selectedRuns); 727 //ToList is necessary to prevent lazy evaluation 728 HideRuns(selectedRuns.ToList()); 731 729 //could not use ClearSelectedRuns as the runs are not visible anymore 732 730 selectedRuns.Clear();
Note: See TracChangeset
for help on using the changeset viewer.