Index: /trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
===================================================================
--- /trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs	(revision 17425)
+++ /trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs	(revision 17426)
@@ -25,23 +25,16 @@
 namespace HeuristicLab.MainForm.WindowsForms {
   internal sealed partial class ProgressView : UserControl {
-    private readonly Control control;
-    public Control Control {
-      get { return control; }
-    }
-
-    private readonly IProgress content;
-    public IProgress Content {
-      get { return content; }
-    }
-
-    public ProgressView(Control control, IProgress content)
+    public Control TargetControl { get; }
+    public IProgress Content { get; }
+
+    public ProgressView(Control targetControl, IProgress content)
       : base() {
-      if (control == null) throw new ArgumentNullException("control");
-      if (control.Parent == null) throw new InvalidOperationException("A Progress can only be shown on controls that have a Parent-control. Therefore, Dialogs and Forms cannot have an associated ProgressView.");
-      if (content == null) throw new ArgumentNullException("content");
+      if (targetControl == null) throw new ArgumentNullException(nameof(targetControl));
+      if (targetControl.Parent == null) throw new InvalidOperationException("A Progress can only be shown on controls that have a Parent-control. Therefore, Dialogs and Forms cannot have an associated ProgressView.");
+      if (content == null) throw new ArgumentNullException(nameof(content));
       InitializeComponent();
 
-      this.control = control;
-      this.content = content;
+      this.TargetControl = targetControl;
+      this.Content = content;
 
       if (content.ProgressState != ProgressState.Finished)
@@ -52,7 +45,9 @@
     protected override void Dispose(bool disposing) {
       DeregisterContentEvents();
-      HideProgress();
-
-      if (disposing && (components != null)) {
+
+      if (!TargetControl.IsDisposed)
+        HideProgress();
+
+      if (disposing && components != null) {
         components.Dispose();
       }
@@ -101,12 +96,12 @@
 
     private void ShowProgress() {
-      if (Control.InvokeRequired) {
-        Control.Invoke((Action)ShowProgress);
+      if (TargetControl.InvokeRequired) {
+        TargetControl.Invoke((Action)ShowProgress);
         return;
       }
       if (Parent != null) return;
 
-      Left = (Control.ClientRectangle.Width / 2) - (Width / 2);
-      Top = (Control.ClientRectangle.Height / 2) - (Height / 2);
+      Left = (TargetControl.ClientRectangle.Width / 2) - (Width / 2);
+      Top = (TargetControl.ClientRectangle.Height / 2) - (Height / 2);
       Anchor = AnchorStyles.None;
 
@@ -115,15 +110,16 @@
       UpdateButtonsState();
 
-      Control.SuspendRepaint();
-      Control.Enabled = false;
-      Parent = Control.Parent;
+      TargetControl.SuspendRepaint();
+      TargetControl.Enabled = false;
+      RegisterTargetControlEvents();
+      Parent = TargetControl.Parent;
       BringToFront();
-      Control.ResumeRepaint(true);
+      TargetControl.ResumeRepaint(true);
       Visible = true;
     }
 
     private void HideProgress() {
-      if (Control.InvokeRequired) {
-        Control.Invoke((Action)HideProgress);
+      if (TargetControl.InvokeRequired) {
+        TargetControl.Invoke((Action)HideProgress);
         return;
       }
@@ -131,13 +127,37 @@
 
       Visible = false;
-      Control.SuspendRepaint();
-      Control.Enabled = true;
-      Control.ResumeRepaint(true);
+      TargetControl.SuspendRepaint();
+      TargetControl.Enabled = true;
+      DeregisterTargetControlEvents();
       Parent = null;
+      TargetControl.ResumeRepaint(TargetControl.Visible);
+    }
+
+
+    private void RegisterTargetControlEvents() {
+      TargetControl.Disposed += TargetControl_Disposed;
+      TargetControl.VisibleChanged += TargetControl_VisibleChanged;
+      TargetControl.ParentChanged += TargetControl_ParentChanged;
+    }
+
+    private void DeregisterTargetControlEvents() {
+      TargetControl.Disposed -= TargetControl_Disposed;
+      TargetControl.VisibleChanged -= TargetControl_VisibleChanged;
+      TargetControl.ParentChanged -= TargetControl_ParentChanged;
+    }
+
+    private void TargetControl_Disposed(object sender, EventArgs e) {
+      Dispose();
+    }
+    private void TargetControl_VisibleChanged(object sender, EventArgs e) {
+      Visible = TargetControl.Visible;
+    }
+    private void TargetControl_ParentChanged(object sender, EventArgs e) {
+      Parent = TargetControl.Parent;
     }
 
     private void UpdateProgressState() {
-      if (Control.InvokeRequired) {
-        Control.Invoke((Action)UpdateProgressState);
+      if (TargetControl.InvokeRequired) {
+        TargetControl.Invoke((Action)UpdateProgressState);
         return;
       }
@@ -150,10 +170,10 @@
 
     private void UpdateProgressMessage() {
-      if (Control.InvokeRequired) {
-        Control.Invoke((Action)UpdateProgressMessage);
-        return;
-      }
-
-      messageLabel.Text = content.Message;
+      if (TargetControl.InvokeRequired) {
+        TargetControl.Invoke((Action)UpdateProgressMessage);
+        return;
+      }
+
+      messageLabel.Text = Content.Message;
     }
 
@@ -167,5 +187,5 @@
         case ProgressMode.Determinate:
           progressBar.Style = ProgressBarStyle.Continuous;
-          progressBar.Value = (int)Math.Round(progressBar.Minimum + content.ProgressValue * (progressBar.Maximum - progressBar.Minimum));
+          progressBar.Value = (int)Math.Round(progressBar.Minimum + Content.ProgressValue * (progressBar.Maximum - progressBar.Minimum));
           break;
         case ProgressMode.Indeterminate:
@@ -174,19 +194,19 @@
           break;
         default:
-          throw new NotImplementedException($"Invalid Progress Mode: {content.ProgressMode}");
+          throw new NotImplementedException($"Invalid Progress Mode: {Content.ProgressMode}");
       }
     }
 
     private void UpdateButtonsState() {
-      if (Control.InvokeRequired) {
-        Control.Invoke((Action)UpdateButtonsState);
+      if (TargetControl.InvokeRequired) {
+        TargetControl.Invoke((Action)UpdateButtonsState);
         return;
       }
 
       stopButton.Visible = Content.CanBeStopped;
-      stopButton.Enabled = Content.CanBeStopped && content.ProgressState == ProgressState.Started;
+      stopButton.Enabled = Content.CanBeStopped && Content.ProgressState == ProgressState.Started;
 
       cancelButton.Visible = Content.CanBeCanceled;
-      cancelButton.Enabled = Content.CanBeCanceled && content.ProgressState == ProgressState.Started;
+      cancelButton.Enabled = Content.CanBeCanceled && Content.ProgressState == ProgressState.Started;
     }
 
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.cs	(revision 17425)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.cs	(revision 17426)
@@ -25,4 +25,5 @@
 using System.Threading;
 using System.Threading.Tasks;
+using System.Windows.Forms;
 using HeuristicLab.Common;
 using HeuristicLab.Data;
@@ -40,5 +41,4 @@
     private CancellationTokenSource cancellationToken = new CancellationTokenSource();
     private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>();
-    private bool attachedToProgress = false;
 
     public new IClassificationSolution Content {
@@ -87,12 +87,14 @@
       }
     }
-    protected override void OnHidden(EventArgs e) {
-      base.OnHidden(e);
+    protected override void OnVisibleChanged(EventArgs e) {
+      base.OnVisibleChanged(e);
+      if (!this.Visible) {
+        cancellationToken.Cancel();
+      }
+    }
+
+    protected override void OnClosed(FormClosedEventArgs e) {
+      base.OnClosed(e);
       cancellationToken.Cancel();
-
-      if (attachedToProgress) {
-        Progress.Hide(this);
-        attachedToProgress = false;
-      }
     }
 
@@ -133,5 +135,4 @@
       variableImpactsArrayView.Caption = Content.Name + " Variable Impacts";
       progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name);
-      attachedToProgress = true;
       cancellationToken = new CancellationTokenSource();
 
@@ -145,15 +146,11 @@
           .ToList();
 
-        List<Tuple<string, double>> impacts = null;
-        await Task.Run(() => { impacts = CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedClassValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress); });
-        if (impacts == null) { return; }
+        var impacts = await Task.Run(() => CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedClassValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress));
 
         rawVariableImpacts.AddRange(impacts);
         UpdateOrdering();
+      } catch (OperationCanceledException) {
       } finally {
-        if (attachedToProgress) {
-          Progress.Hide(this);
-          attachedToProgress = false;
-        }
+        Progress.Hide(this);
       }
     }
@@ -180,5 +177,5 @@
       var clonedModel = (IClassificationModel)model.Clone();
       foreach (var variableName in originalVariableOrdering) {
-        if (cancellationToken.Token.IsCancellationRequested) { return null; }
+        token.ThrowIfCancellationRequested();
         progress.ProgressValue = (double)++i / count;
         progress.Message = string.Format("Calculating impact for variable {0} ({1} of {2})", variableName, i, count);
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs	(revision 17425)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs	(revision 17426)
@@ -25,4 +25,5 @@
 using System.Threading;
 using System.Threading.Tasks;
+using System.Windows.Forms;
 using HeuristicLab.Common;
 using HeuristicLab.Data;
@@ -40,5 +41,4 @@
     private CancellationTokenSource cancellationToken = new CancellationTokenSource();
     private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>();
-    private bool attachedToProgress = false;
 
     public new IRegressionSolution Content {
@@ -88,12 +88,14 @@
     }
 
-    protected override void OnHidden(EventArgs e) {
-      base.OnHidden(e);
+    protected override void OnVisibleChanged(EventArgs e) {
+      base.OnVisibleChanged(e);
+      if (!this.Visible) {
+        cancellationToken.Cancel();
+      }
+    }
+
+    protected override void OnClosed(FormClosedEventArgs e) {
+      base.OnClosed(e);
       cancellationToken.Cancel();
-
-      if (attachedToProgress) {
-        Progress.Hide(this);
-        attachedToProgress = false;
-      }
     }
 
@@ -132,5 +134,4 @@
       variableImpactsArrayView.Caption = Content.Name + " Variable Impacts";
       var progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name);
-      attachedToProgress = true;
       cancellationToken = new CancellationTokenSource();
 
@@ -144,15 +145,11 @@
           .ToList();
 
-        List<Tuple<string, double>> impacts = null;
-        await Task.Run(() => { impacts = CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress); });
-        if (impacts == null) { return; }
+        var impacts = await Task.Run(() => CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress));
 
         rawVariableImpacts.AddRange(impacts);
         UpdateOrdering();
+      } catch (OperationCanceledException) {
       } finally {
-        if (attachedToProgress) {
-          Progress.Hide(this);
-          attachedToProgress = false;
-        }
+        Progress.Hide(this);
       }
     }
@@ -179,5 +176,5 @@
 
       foreach (var variableName in originalVariableOrdering) {
-        if (cancellationToken.Token.IsCancellationRequested) { return null; }
+        token.ThrowIfCancellationRequested();
         progress.ProgressValue = (double)++i / count;
         progress.Message = string.Format("Calculating impact for variable {0} ({1} of {2})", variableName, i, count);
