| 310 | } |
| 311 | |
| 312 | void TimerRecordDialog::OnTimeText_End(wxCommandEvent& WXUNUSED(event)) |
| 313 | { |
| 314 | //v NumericTextCtrl doesn't implement upper ranges, i.e., |
| 315 | // if I tell it "024 h 060 m 060 s", then |
| 316 | // user increments the hours past 23, it rolls over to 0 |
| 317 | // (although if you increment below 0, it stays at 0). |
| 318 | // So instead, set the max to 99 and just catch hours > 24 and fix the ctrls. |
| 319 | double dTime = m_pTimeTextCtrl_End->GetValue(); |
| 320 | long days = (long)(dTime / (24.0 * 3600.0)); |
| 321 | if (days > 0) { |
| 322 | dTime -= (double)days * 24.0 * 3600.0; |
| 323 | m_DateTime_End += wxTimeSpan::Days(days); |
| 324 | m_pDatePickerCtrl_End->SetValue(m_DateTime_End); |
| 325 | m_pTimeTextCtrl_End->SetValue(dTime); |
| 326 | } |
| 327 | |
| 328 | wxDateEvent dummyDateEvent; |
| 329 | this->OnDatePicker_End(dummyDateEvent); |
| 330 | } |
| 331 | |
| 332 | void TimerRecordDialog::OnTimeText_Duration(wxCommandEvent& WXUNUSED(event)) |
| 333 | { |
nothing calls this directly
no test coverage detected