Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6488


Ignore:
Timestamp:
06/27/11 17:58:15 (13 years ago)
Author:
mkommend
Message:

#1555: Fixed docking issues with expanded nodes.

File:
1 edited

Legend:

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

    r6485 r6488  
    4949    }
    5050
     51    #region necessary code to handle dock correctly regarding the expanded nodes
     52    bool[] expandendedState;
     53    protected override void OnHandleCreated(EventArgs e) {
     54      base.OnHandleCreated(e);
     55      if (expandendedState == null) return;
     56      var nodes = IterateTreeNodes().ToList();
     57      for (int i = 0; i < nodes.Count; i++)
     58        if (expandendedState[i]) nodes[i].Expand();
     59    }
     60    protected override void OnHandleDestroyed(EventArgs e) {
     61      base.OnHandleDestroyed(e);
     62      var nodes = IterateTreeNodes().ToList();
     63      expandendedState = new bool[nodes.Count];
     64      for (int i = 0; i < nodes.Count; i++)
     65        expandendedState[i] = nodes[i].IsExpanded;
     66    }
     67    #endregion
     68
    5169    public new Experiment Content {
    5270      get { return (Experiment)base.Content; }
Note: See TracChangeset for help on using the changeset viewer.