Changeset 4826


Ignore:
Timestamp:
11/17/10 12:15:58 (8 years ago)
Author:
epitzer
Message:

Fully display the tree view after repopulating, which creates handles for all nodes and no problems occur when deleting nodes. (#1277)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs

    r4261 r4826  
    129129                  imageList.Images.Add(type.FullName, item.ItemImage);
    130130                  typeNode.ImageIndex = imageList.Images.IndexOfKey(type.FullName);
    131                 }
    132                 catch (Exception) { }
     131                } catch (Exception) { }
    133132              }
    134133              typeNode.SelectedImageIndex = typeNode.ImageIndex;
     
    154153      else {
    155154        searchString = searchString.ToLower();
    156         typesTreeView.BeginUpdate();
     155
    157156        if (!searchString.Contains(currentSearchString)) {
     157          typesTreeView.BeginUpdate();
    158158          // expand search -> restore all tree nodes
    159159          TreeNode selectedNode = typesTreeView.SelectedNode;
     
    162162            typesTreeView.Nodes.Add((TreeNode)node.Clone());
    163163          RestoreSelectedNode(selectedNode);
    164         }
     164          typesTreeView.EndUpdate();
     165        }
     166
    165167
    166168        // remove nodes
     169        typesTreeView.BeginUpdate();
    167170        int i = 0;
    168171        while (i < typesTreeView.Nodes.Count) {
Note: See TracChangeset for help on using the changeset viewer.