Changeset 12284 for branches/NewItemDialog
- Timestamp:
- 04/02/15 18:02:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NewItemDialog/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r12246 r12284 33 33 private bool isInitialized; 34 34 35 private List<TreeNode> treeNodes;35 private readonly List<TreeNode> treeNodes; 36 36 private string currentSearchString; 37 37 … … 100 100 var parents = tokens.Take(tokens.Length - 1); 101 101 102 var categoryNode = new TreeNode(name, 1,1) {102 var categoryNode = new TreeNode(name, imageIndex: 1, selectedImageIndex: 1) { 103 103 Name = fullName, 104 104 Tag = fullName … … 121 121 parentNode = node.Nodes.Find(fullName, searchAllChildren: false).SingleOrDefault(); 122 122 if (parentNode == null) { 123 parentNode = new TreeNode(parentCategory, 1,1) {123 parentNode = new TreeNode(parentCategory, imageIndex: 1, selectedImageIndex: 1) { 124 124 Name = fullName, 125 125 Tag = fullName … … 229 229 } 230 230 return node.Nodes.Count == 0; 231 } 232 if (node.Tag is Type) { // Type node 231 } if (node.Tag is Type) { // Type node 233 232 var text = node.Text; 234 233 if (searchTokens.Any(searchToken => !text.ToLower().Contains(searchToken))) { 235 234 var typeTag = (Type)node.Tag; 236 if (typeTag .Equals(SelectedType)) {235 if (typeTag == SelectedType) { 237 236 SelectedType = null; 238 237 typesTreeView.SelectedNode = null; … … 242 241 return false; 243 242 } 244 return true;243 throw new InvalidOperationException("Encountered neither a category nor a creatable node during tree traversal."); 245 244 } 246 245
Note: See TracChangeset
for help on using the changeset viewer.