1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

Bugs 561 (P2) and 562 (P4) are really the same set of bugs caused by r11636, I think, and I think this fixes all of them. See http://bugzilla.audacityteam.org/show_bug.cgi?id=561#c1.

This commit is contained in:
v.audacity 2012-07-27 01:35:15 +00:00
parent e582ac65f8
commit 4a22a17d9a

View File

@ -104,9 +104,7 @@ void TimerRecordDialog::OnTimer(wxTimerEvent& event)
wxDateTime dateTime_UNow = wxDateTime::UNow();
if (m_DateTime_Start < dateTime_UNow) {
m_DateTime_Start = dateTime_UNow;
if (m_DateTime_Start.GetDateOnly() < dateTime_UNow.GetDateOnly()) {
m_pDatePickerCtrl_Start->SetValue(m_DateTime_Start);
}
m_pTimeTextCtrl_Start->SetTimeValue(wxDateTime_to_AudacityTime(m_DateTime_Start));
this->UpdateEnd(); // Keep Duration constant and update End for changed Start.
}
@ -167,9 +165,6 @@ void TimerRecordDialog::OnDatePicker_End(wxDateEvent& event)
// need to implement it for the TimeTextCtrls.
if (m_DateTime_End < m_DateTime_Start) {
m_DateTime_End = m_DateTime_Start;
m_pDatePickerCtrl_End->SetValue(m_DateTime_End);
m_pDatePickerCtrl_End->SetRange(m_DateTime_End, wxInvalidDateTime);
m_pDatePickerCtrl_End->Refresh();
m_pTimeTextCtrl_End->SetTimeValue(wxDateTime_to_AudacityTime(m_DateTime_End));
}
@ -444,11 +439,9 @@ void TimerRecordDialog::UpdateEnd()
{
//v Use remaining disk -> record time calcs from AudacityProject::OnTimer to set range?
m_DateTime_End = m_DateTime_Start + m_TimeSpan_Duration;
if (m_pDatePickerCtrl_End->GetValue().GetDateOnly() < m_DateTime_End.GetDateOnly()) {
m_pDatePickerCtrl_End->SetValue(m_DateTime_End);
m_pDatePickerCtrl_End->SetRange(m_DateTime_Start, wxInvalidDateTime); // No backdating.
m_pDatePickerCtrl_End->Refresh();
}
m_pTimeTextCtrl_End->SetTimeValue(wxDateTime_to_AudacityTime(m_DateTime_End));
}