mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-22 23:48:02 +02:00
Simplify the conversion from wxLongLong to double. No need to convert to string and from that (via Internat) to double.
This commit is contained in:
parent
d135edfb93
commit
86b1edf73e
@ -366,8 +366,8 @@ void TimerRecordDialog::PopulateOrExchange(ShuttleGui& S)
|
|||||||
wxString strFormat1 = wxT("099 days 024 h 060 m 060 s");
|
wxString strFormat1 = wxT("099 days 024 h 060 m 060 s");
|
||||||
m_pTimeTextCtrl_Duration = new TimeTextCtrl(this, ID_TIMETEXT_DURATION, strFormat1);
|
m_pTimeTextCtrl_Duration = new TimeTextCtrl(this, ID_TIMETEXT_DURATION, strFormat1);
|
||||||
m_pTimeTextCtrl_Duration->SetName(_("Duration"));
|
m_pTimeTextCtrl_Duration->SetName(_("Duration"));
|
||||||
m_pTimeTextCtrl_Duration->SetTimeValue(
|
wxLongLong sex = m_TimeSpan_Duration.GetSeconds();
|
||||||
Internat::CompatibleToDouble(m_TimeSpan_Duration.GetSeconds().ToString()));
|
m_pTimeTextCtrl_Duration->SetTimeValue(m_TimeSpan_Duration.GetSeconds().ToDouble());
|
||||||
S.AddWindow(m_pTimeTextCtrl_Duration);
|
S.AddWindow(m_pTimeTextCtrl_Duration);
|
||||||
m_pTimeTextCtrl_Duration->EnableMenu(false);
|
m_pTimeTextCtrl_Duration->EnableMenu(false);
|
||||||
}
|
}
|
||||||
@ -417,8 +417,7 @@ bool TimerRecordDialog::TransferDataFromWindow()
|
|||||||
void TimerRecordDialog::UpdateDuration()
|
void TimerRecordDialog::UpdateDuration()
|
||||||
{
|
{
|
||||||
m_TimeSpan_Duration = m_DateTime_End - m_DateTime_Start;
|
m_TimeSpan_Duration = m_DateTime_End - m_DateTime_Start;
|
||||||
m_pTimeTextCtrl_Duration->SetTimeValue(
|
m_pTimeTextCtrl_Duration->SetTimeValue(m_TimeSpan_Duration.GetSeconds().ToDouble());
|
||||||
Internat::CompatibleToDouble(m_TimeSpan_Duration.GetSeconds().ToString()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update m_DateTime_End and ctrls based on m_DateTime_Start and m_TimeSpan_Duration.
|
// Update m_DateTime_End and ctrls based on m_DateTime_Start and m_TimeSpan_Duration.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user