Changeset 14953
- Timestamp:
- 05/10/17 14:23:23 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r14917 r14953 85 85 groupingComboBox.SelectedItem = Content.GroupingVariable; 86 86 87 GenerateCharts( );87 GenerateCharts(true); 88 88 } 89 89 } … … 239 239 240 240 // clear caches 241 columnHeaderCache[name].Dispose(); 241 242 columnHeaderCache.Remove(name); 243 rowHeaderCache[name].Dispose(); 242 244 rowHeaderCache.Remove(name); 243 245 var keys = bodyCache.Keys.Where(t => t.Item1 == name || t.Item2 == name).ToList(); 244 foreach (var key in keys) 246 foreach (var key in keys) { 247 bodyCache[key].Dispose(); 245 248 bodyCache.Remove(key); 249 } 246 250 247 251 if (IsVariableChecked(name)) { … … 255 259 } 256 260 protected override void ResetAllVariables() { 257 GenerateCharts( );261 GenerateCharts(true); 258 262 } 259 263 #endregion … … 331 335 332 336 protected override void CheckedChangedUpdate() { 333 GenerateCharts( );337 GenerateCharts(false); // only checked-changes -> reuse cached values 334 338 } 335 339 336 340 #region Generate Charts 337 private void GenerateCharts( ) {341 private void GenerateCharts(bool clearCache) { 338 342 if (suppressCheckedChangedUpdate) return; 339 343 … … 346 350 tableLayoutPanel.RowStyles.Clear(); 347 351 } 348 columnHeaderCache.Clear(); 349 rowHeaderCache.Clear(); 350 bodyCache.Clear(); 352 353 if (clearCache) { 354 foreach (var control in bodyCache.Values 355 .Concat(columnHeaderCache.Values) 356 .Concat(rowHeaderCache.Values)) { 357 control.Dispose(); 358 } 359 columnHeaderCache.Clear(); 360 rowHeaderCache.Clear(); 361 bodyCache.Clear(); 362 } 351 363 352 364 // Set row and column count … … 542 554 543 555 private void groupingComboBox_SelectedIndexChanged(object sender, EventArgs e) { 544 GenerateCharts( );556 GenerateCharts(true); // new series within charts -> clear cache 545 557 } 546 558 }
Note: See TracChangeset
for help on using the changeset viewer.