MCPcopy Create free account
hub / github.com/audacity/audacity / OnTimeText_End

Method OnTimeText_End

src/TimerRecordDialog.cpp:312–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void 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
332void TimerRecordDialog::OnTimeText_Duration(wxCommandEvent& WXUNUSED(event))
333{

Callers

nothing calls this directly

Calls 3

OnDatePicker_EndMethod · 0.95
GetValueMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected