Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/14 14:14:42 (10 years ago)
Author:
gkronber
Message:

#2197: fixed bugs in views for data analysis solutions that might occur if the problem does not have training samples (e.g. when the data is loaded into an existing solution)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.cs

    r10540 r11093  
    2121
    2222using System;
    23 using System.Windows.Forms;
     23using System.Linq;
    2424using HeuristicLab.MainForm;
    2525using HeuristicLab.Problems.DataAnalysis.Views;
     
    4040    protected override void SetEnabledStateOfControls() {
    4141      base.SetEnabledStateOfControls();
    42       btnSimplify.Enabled = Content != null && !Locked;
     42      btnSimplify.Enabled = Content != null && !Locked && Content.ProblemData.TrainingIndices.Any(); // simplification is only possible if there are trainings samples
    4343    }
    4444
    4545    private void btn_SimplifyModel_Click(object sender, EventArgs e) {
    46       InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView view = new InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView();
     46      var view = new InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView();
    4747      view.Content = (SymbolicTimeSeriesPrognosisSolution)this.Content.Clone();
    4848      view.Show();
Note: See TracChangeset for help on using the changeset viewer.