Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/18/19 14:19:49 (4 years ago)
Author:
pfleck
Message:

#3042 Moved code for enabling/disabling the Optimize-Button to SetEnabledStateOfControls and called SetEnabledStateOfControls after the Model is changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r17378 r17380  
    168168    private void Content_Changed(object sender, EventArgs e) {
    169169      UpdateView();
     170      SetEnabledStateOfControls();
    170171    }
    171172
     
    186187    }
    187188
    188     protected virtual async void UpdateView() {
     189    private async void UpdateView() {
    189190      if (Content == null || Content.Model == null || Content.ProblemData == null) return;
    190191      var tree = Content.Model.SymbolicExpressionTree;
     
    317318        var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
    318319        await Task.Delay(500); // wait for progressbar to finish animation
    319         UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed)
    320       } catch (Exception) {
     320        UpdateModel(newTree);
     321      } finally {
    321322        progress.Finish();
    322         throw;
    323323      }
    324324    }
Note: See TracChangeset for help on using the changeset viewer.