diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-14 22:39:11 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-22 23:26:01 +0000 |
| commit | a0cafafc73958b21db24dfed8693b27238361114 (patch) | |
| tree | ca94f0221454143cd46099419b94eafc651a2f7b /src | |
| parent | e3321029d7c57d4a0a7e72e9c0aa69eb1e124016 (diff) | |
Use DCPTime::split.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/controls.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/wx/controls.cc b/src/wx/controls.cc index 0fa92b69a..cc0ed25bb 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -605,12 +605,9 @@ Controls::add_content_to_list (shared_ptr<Content> content, wxListCtrl* ctrl) it.SetId(N); it.SetColumn(0); DCPTime length = content->length_after_trim (_film); - int seconds = length.seconds(); - int minutes = seconds / 60; - seconds -= minutes * 60; - int hours = minutes / 60; - minutes -= hours * 60; - it.SetText(wxString::Format("%02d:%02d:%02d", hours, minutes, seconds)); + int h, m, s, f; + length.split (24, h, m, s, f); + it.SetText(wxString::Format("%02d:%02d:%02d", h, m, s)); ctrl->InsertItem(it); shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(content); |
