Changeset 17276 for trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs
- Timestamp:
- 09/27/19 10:14:28 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs
r17180 r17276 40 40 private CancellationTokenSource cancellationToken = new CancellationTokenSource(); 41 41 private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>(); 42 private bool attachedToProgress = false; 42 43 43 44 public new IRegressionSolution Content { … … 86 87 } 87 88 } 88 private void RegressionSolutionVariableImpactsView_VisibleChanged(object sender, EventArgs e) { 89 90 protected override void OnHidden(EventArgs e) { 91 base.OnHidden(e); 89 92 cancellationToken.Cancel(); 93 94 if (attachedToProgress) { 95 Progress.Hide(this); 96 attachedToProgress = false; 97 } 90 98 } 91 99 … … 124 132 variableImpactsArrayView.Caption = Content.Name + " Variable Impacts"; 125 133 var progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name); 134 attachedToProgress = true; 126 135 cancellationToken = new CancellationTokenSource(); 127 136 … … 141 150 rawVariableImpacts.AddRange(impacts); 142 151 UpdateOrdering(); 143 } 144 finally { 145 Progress.Hide(this); 152 } finally { 153 if (attachedToProgress) { 154 Progress.Hide(this); 155 attachedToProgress = false; 156 } 146 157 } 147 158 }
Note: See TracChangeset
for help on using the changeset viewer.