Shift times: Use TimeEdit::SetTime() instead of TimeEdit::SetValue()

TimeEdit::SetValue() will trigger TimeEdit::OnModified(), but that
doesn't always update the internal "time" property.
TimeEdit::OnModified() seems to be designed to handle editing the value
with the keyboard, not with SetValue().

Originally committed to SVN as r6943.
This commit is contained in:
cantabile 2012-07-24 02:39:37 +00:00 committed by Thomas Goyne
parent 3193e05747
commit 5ecb89eeec

View file

@ -260,7 +260,7 @@ void DialogShiftTimes::OnHistoryClick(wxCommandEvent &evt) {
json::Object& obj = (*history)[entry]; json::Object& obj = (*history)[entry];
if (obj["is by time"]) { if (obj["is by time"]) {
shift_time->SetValue(lagi_wxString(obj["amount"])); shift_time->SetTime(AssTime(lagi_wxString(obj["amount"])));
shift_by_time->SetValue(true); shift_by_time->SetValue(true);
OnByTime(evt); OnByTime(evt);
} }