| 268 | } |
| 269 | |
| 270 | void TimerRecordDialog::OnTimeText_Start(wxCommandEvent& WXUNUSED(event)) |
| 271 | { |
| 272 | //v NumericTextCtrl doesn't implement upper ranges, i.e., |
| 273 | // if I tell it "024 h 060 m 060 s", then |
| 274 | // user increments the hours past 23, it rolls over to 0 |
| 275 | // (although if you increment below 0, it stays at 0). |
| 276 | // So instead, set the max to 99 and just catch hours > 24 and fix the ctrls. |
| 277 | double dTime = m_pTimeTextCtrl_Start->GetValue(); |
| 278 | long days = (long)(dTime / (24.0 * 3600.0)); |
| 279 | if (days > 0) { |
| 280 | dTime -= (double)days * 24.0 * 3600.0; |
| 281 | m_DateTime_Start += wxTimeSpan::Days(days); |
| 282 | m_pDatePickerCtrl_Start->SetValue(m_DateTime_Start); |
| 283 | m_pTimeTextCtrl_Start->SetValue(dTime); |
| 284 | } |
| 285 | |
| 286 | wxDateEvent dummyDateEvent; |
| 287 | this->OnDatePicker_Start(dummyDateEvent); |
| 288 | } |
| 289 | |
| 290 | void TimerRecordDialog::OnDatePicker_End(wxDateEvent& WXUNUSED(event)) |
| 291 | { |
nothing calls this directly
no test coverage detected