Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6549


Ignore:
Timestamp:
07/08/11 09:52:06 (13 years ago)
Author:
mkommend
Message:

#1555: Fixed updating of the results collection in the experiment tree view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentTreeView.cs

    r6542 r6549  
    106106
    107107      if (algorithm != null) {
     108        algorithm.Prepared += new EventHandler(algorithm_Prepared);
    108109        algorithm.ProblemChanged += new EventHandler(algorithm_ProblemChanged);
    109110      } else if (batchRun != null) {
     
    125126      var batchRun = namedItem as BatchRun;
    126127      var experiment = namedItem as Experiment;
     128
    127129      if (algorithm != null) {
     130        algorithm.Prepared -= new EventHandler(algorithm_Prepared);
    128131        algorithm.ProblemChanged -= new EventHandler(algorithm_ProblemChanged);
    129132      } else if (batchRun != null) {
     
    156159      }
    157160      SetEnabledStateOfControls();
     161    }
     162
     163    private void algorithm_Prepared(object sender, EventArgs e) {
     164      var algorithm = (IAlgorithm)sender;
     165      foreach (TreeNode node in treeNodeTagMapping[algorithm]) {
     166        TreeNode resultsNode = node.Nodes.OfType<TreeNode>().Where(x => x.Tag is ResultCollection).Single();
     167        if (detailsViewHost.Content == resultsNode.Tag)
     168          detailsViewHost.Content = algorithm.Results;
     169        resultsNode.Tag = algorithm.Results;
     170      }
    158171    }
    159172
Note: See TracChangeset for help on using the changeset viewer.