We used to have 8 modes which showed different combinations of the length, start, end, center controls. Mode 7 for example showed all four at the same time.
| 513 | // length, start, end, center controls. |
| 514 | // Mode 7 for example showed all four at the same time. |
| 515 | void SelectionBar::SetSelectionMode(SelectionMode mode) |
| 516 | { |
| 517 | mSelectionMode = mode; |
| 518 | |
| 519 | // Update names and WindowIds for the screen readers |
| 520 | auto& modeName = ModeNames[static_cast<size_t>(mode)]; |
| 521 | |
| 522 | if (mTimeControls[0]) { |
| 523 | mTimeControls[0]->SetName(modeName.first); |
| 524 | mTimeControls[0]->SetId(WindowIDs.at(modeName.first)); |
| 525 | } |
| 526 | |
| 527 | if (mTimeControls[1]) { |
| 528 | mTimeControls[1]->SetName(modeName.second); |
| 529 | mTimeControls[1]->SetId(WindowIDs.at(modeName.second)); |
| 530 | } |
| 531 | |
| 532 | UpdateTimeControlsFormat(mTimeControls[0]->GetFormatName()); |
| 533 | |
| 534 | ValuesToControls(); |
| 535 | } |
| 536 | |
| 537 | void SelectionBar::ValuesToControls() |
| 538 | { |
no test coverage detected