Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6874


Ignore:
Timestamp:
10/05/11 21:11:04 (13 years ago)
Author:
abeham
Message:

#1655

  • fixed TypeSelector to check if the currently selected type is still a valid option
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Core.Views/3.3/TypeSelector.cs

    r6685 r6874  
    105105        this.showNotInstantiableTypes = showNotInstantiableTypes;
    106106        this.showGenericTypes = showGenericTypes;
     107        bool selectedTypeFound = false;
    107108
    108109        typeParametersSplitContainer.Panel2Collapsed = !showGenericTypes;
     
    151152              typeNode.Tag = type;
    152153              pluginNode.Nodes.Add(typeNode);
     154              if (type.Equals(selectedType)) selectedTypeFound = true;
    153155            }
    154156          }
     
    156158            treeNodes.Add(pluginNode);
    157159        }
     160        if (!selectedTypeFound) SelectedType = null;
    158161        foreach (TreeNode node in treeNodes)
    159162          typesTreeView.Nodes.Add((TreeNode)node.Clone());
     
    189192          int j = 0;
    190193          while (j < typesTreeView.Nodes[i].Nodes.Count) {
    191             if (!typesTreeView.Nodes[i].Nodes[j].Text.ToLower().Contains(searchString))
     194            if (!typesTreeView.Nodes[i].Nodes[j].Text.ToLower().Contains(searchString)) {
     195              if ((typesTreeView.Nodes[i].Nodes[j].Tag as Type).Equals(selectedType))
     196                SelectedType = null;
    192197              typesTreeView.Nodes[i].Nodes[j].Remove();
    193             else
     198            } else
    194199              j++;
    195200          }
Note: See TracChangeset for help on using the changeset viewer.