Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6542


Ignore:
Timestamp:
07/07/11 16:36:51 (13 years ago)
Author:
mkommend
Message:

#1555: Corrected SelectedItemImage and registering of algorithm events if the problem gets changed.

File:
1 edited

Legend:

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

    r6539 r6542  
    170170          childNode.Remove();
    171171        }
    172         foreach (TreeNode childNode in CreateAlgorithmChildNodes(algorithm))
     172        List<TreeNode> nodes;
     173        foreach (TreeNode childNode in CreateAlgorithmChildNodes(algorithm)) {
    173174          node.Nodes.Add(childNode);
     175          NamedItem namedItem = childNode.Tag as NamedItem;
     176          if (namedItem != null) {
     177            if (!treeNodeTagMapping.TryGetValue(namedItem, out nodes)) {
     178              nodes = new List<TreeNode>();
     179              treeNodeTagMapping.Add(namedItem, nodes);
     180              RegisterNamedItemEvents(namedItem);
     181            }
     182            nodes.Add(childNode);
     183          }
     184        }
     185
    174186        node.Expand();
    175187      }
     
    859871        treeView.ImageList.Images.Add(item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage);
    860872        treeNode.ImageIndex = treeView.ImageList.Images.Count - 1;
     873        treeNode.SelectedImageIndex = treeNode.ImageIndex;
    861874      }
    862875      treeView.Nodes.AddRange(topLevelNodes);
Note: See TracChangeset for help on using the changeset viewer.