- Timestamp:
- 06/23/15 12:50:05 (9 years ago)
- Location:
- branches/GBT
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GBT
- Property svn:mergeinfo changed
/trunk/sources merged: 12392-12393,12397-12401,12422,12424,12428-12435,12442-12443,12445,12455-12458,12461,12463-12465,12470-12476,12478-12482,12485,12488,12490-12494 -
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:mergeinfo changed
-
branches/GBT/HeuristicLab.Optimizer
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Optimizer (added) merged: 12393,12397-12399,12401
- Property svn:mergeinfo changed
-
branches/GBT/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r12305 r12495 174 174 } else { 175 175 searchString = searchString.ToLower(); 176 var selectedNode = typesTreeView.SelectedNode; 176 177 177 178 if (!searchString.Contains(currentSearchString)) { 178 179 typesTreeView.BeginUpdate(); 179 180 // expand search -> restore all tree nodes 180 var selectedNode = typesTreeView.SelectedNode;181 181 typesTreeView.Nodes.Clear(); 182 182 foreach (TreeNode node in treeNodes) 183 183 typesTreeView.Nodes.Add((TreeNode)node.Clone()); 184 RestoreSelectedNode(selectedNode);185 184 typesTreeView.EndUpdate(); 186 185 } … … 189 188 typesTreeView.BeginUpdate(); 190 189 var searchTokens = searchString.Split(' '); 191 192 190 int i = 0; 193 191 while (i < typesTreeView.Nodes.Count) { … … 202 200 203 201 // select first item 202 typesTreeView.BeginUpdate(); 204 203 var firstNode = FirstVisibleNode; 205 204 while (firstNode != null && !(firstNode.Tag is Type)) … … 215 214 typesTreeView.Enabled = true; 216 215 } 216 typesTreeView.EndUpdate(); 217 218 RestoreSelectedNode(selectedNode); 217 219 UpdateDescription(); 218 220 } … … 302 304 if (selectedNode != null) { 303 305 var node = typesTreeView.Nodes.Find(selectedNode.Name, searchAllChildren: true).SingleOrDefault(); 304 typesTreeView.SelectedNode = node; 305 if (typesTreeView.SelectedNode == null) SelectedType = null; 306 if (node != null) 307 typesTreeView.SelectedNode = node; 308 if (typesTreeView.SelectedNode == null) 309 SelectedType = null; 306 310 } 307 311 } … … 336 340 } 337 341 338 private void expandAllButton_Click(object sender, EventArgs e) {339 typesTreeView.ExpandAll();340 }341 private void collapseAllButton_Click(object sender, EventArgs e) {342 typesTreeView.CollapseAll();343 }344 345 342 private TreeNode toolStripMenuNode = null; 346 343 private void typesTreeView_MouseDown(object sender, MouseEventArgs e) { … … 374 371 375 372 private void expandToolStripMenuItem_Click(object sender, EventArgs e) { 373 typesTreeView.BeginUpdate(); 376 374 if (toolStripMenuNode != null) toolStripMenuNode.ExpandAll(); 375 typesTreeView.EndUpdate(); 377 376 } 378 377 private void expandAllToolStripMenuItem_Click(object sender, EventArgs e) { 378 typesTreeView.BeginUpdate(); 379 379 typesTreeView.ExpandAll(); 380 typesTreeView.EndUpdate(); 380 381 } 381 382 private void collapseToolStripMenuItem_Click(object sender, EventArgs e) { 383 typesTreeView.BeginUpdate(); 382 384 if (toolStripMenuNode != null) toolStripMenuNode.Collapse(); 385 typesTreeView.EndUpdate(); 383 386 } 384 387 private void collapseAllToolStripMenuItem_Click(object sender, EventArgs e) { 388 typesTreeView.BeginUpdate(); 385 389 typesTreeView.CollapseAll(); 390 typesTreeView.EndUpdate(); 386 391 } 387 392 … … 398 403 var selectedNode = typesTreeView.SelectedNode; 399 404 400 if (selectedNode == null) { // nothing selected => select first or last405 if (selectedNode == null) { // nothing selected => select first 401 406 if (e.KeyCode == Keys.Down) typesTreeView.SelectedNode = FirstVisibleNode; 402 if (e.KeyCode == Keys.Up) typesTreeView.SelectedNode = LastVisibleNode;403 407 } else { 404 if (e.KeyCode == Keys.Down )405 typesTreeView.SelectedNode = selectedNode.NextVisibleNode ?? FirstVisibleNode; // select next or cycle to first406 if (e.KeyCode == Keys.Up )407 typesTreeView.SelectedNode = selectedNode.PrevVisibleNode ?? LastVisibleNode; // select prev or cycle to last408 if (e.KeyCode == Keys.Down && selectedNode.NextVisibleNode != null) 409 typesTreeView.SelectedNode = selectedNode.NextVisibleNode; 410 if (e.KeyCode == Keys.Up && selectedNode.PrevVisibleNode != null) 411 typesTreeView.SelectedNode = selectedNode.PrevVisibleNode; 408 412 } 409 413 e.Handled = true;
Note: See TracChangeset
for help on using the changeset viewer.