Sets the filter
| 469 | // Sets the filter |
| 470 | // |
| 471 | void |
| 472 | KeyView::SetFilter(const wxString & filter) |
| 473 | { |
| 474 | int index = LineToIndex(GetSelection()); |
| 475 | |
| 476 | // Unselect any currently selected line...do even if none selected |
| 477 | SelectNode(-1); |
| 478 | |
| 479 | // Save the filter |
| 480 | mFilter = filter.Lower(); |
| 481 | |
| 482 | // Refresh the view lines |
| 483 | RefreshLines(); |
| 484 | |
| 485 | // Reselect old node (if possible) |
| 486 | if (index != wxNOT_FOUND) |
| 487 | { |
| 488 | SelectNode(index); |
| 489 | } |
| 490 | |
| 491 | // ensure that a node is selected so that when the keyview is the focus, |
| 492 | // this is indicated visually, and the Narrator screen reader reads it. |
| 493 | if ((GetSelection() == wxNOT_FOUND)) |
| 494 | { |
| 495 | SelectNode(LineToIndex(0)); |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | // |
| 500 | // Expand all branches |
no outgoing calls
no test coverage detected