| 571 | } |
| 572 | |
| 573 | void SelectionBar::SetSelectionFormat(const NumericFormatID & format) |
| 574 | { |
| 575 | if (mTimeControls.front() == nullptr) |
| 576 | return; |
| 577 | |
| 578 | const bool changed = mTimeControls.front()->SetFormatName(format); |
| 579 | |
| 580 | // Test first whether changed, to avoid infinite recursion from OnUpdate |
| 581 | if ( changed ) { |
| 582 | wxCommandEvent e; |
| 583 | e.SetString(format.GET()); |
| 584 | OnUpdate(e); |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | void SelectionBar::OnFormatsChanged(ProjectNumericFormatsEvent evt) |
| 589 | { |
no test coverage detected