Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8736


Ignore:
Timestamp:
10/04/12 13:02:24 (12 years ago)
Author:
gkronber
Message:

#1962: fixed bug in the view that caused a unit test fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r8730 r8736  
    124124    protected override void OnModelChanged() {
    125125      base.OnModelChanged();
    126       btnOptimizeConstants.Enabled =
    127         SymbolicRegressionConstantOptimizationEvaluator.CanOptimizeConstants(Content.Model.SymbolicExpressionTree);
     126      if (Content != null)
     127        btnOptimizeConstants.Enabled =
     128          SymbolicRegressionConstantOptimizationEvaluator.CanOptimizeConstants(Content.Model.SymbolicExpressionTree);
     129      else
     130        btnOptimizeConstants.Enabled = false;
    128131    }
    129132    protected override void OnContentChanged() {
    130133      base.OnContentChanged();
    131134      base.OnModelChanged();
    132       btnOptimizeConstants.Enabled =
    133         SymbolicRegressionConstantOptimizationEvaluator.CanOptimizeConstants(Content.Model.SymbolicExpressionTree);
     135      if (Content != null)
     136        btnOptimizeConstants.Enabled =
     137          SymbolicRegressionConstantOptimizationEvaluator.CanOptimizeConstants(Content.Model.SymbolicExpressionTree);
     138      else
     139        btnOptimizeConstants.Enabled = false;
    134140    }
    135141
Note: See TracChangeset for help on using the changeset viewer.