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

Method OnTimeText_Start

src/TimerRecordDialog.cpp:270–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void 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
290void TimerRecordDialog::OnDatePicker_End(wxDateEvent& WXUNUSED(event))
291{

Callers

nothing calls this directly

Calls 3

OnDatePicker_StartMethod · 0.95
GetValueMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected