diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-03-26 16:26:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-03-26 16:26:32 +0100 |
| commit | f0192490565c72aa9838f40cbab56c4c0c60e522 (patch) | |
| tree | cf0f287a164f3a25607f0df13210a5dcc0ffd235 /src/wx/timeline_time_axis_view.cc | |
| parent | 00dffac67c88b509c1c77da85fe2769049714135 (diff) | |
Add time axis to audio analysis (part of #1082).
Diffstat (limited to 'src/wx/timeline_time_axis_view.cc')
| -rw-r--r-- | src/wx/timeline_time_axis_view.cc | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/wx/timeline_time_axis_view.cc b/src/wx/timeline_time_axis_view.cc index 45bf7e7cf..1947faa0b 100644 --- a/src/wx/timeline_time_axis_view.cc +++ b/src/wx/timeline_time_axis_view.cc @@ -20,6 +20,7 @@ #include "timeline_time_axis_view.h" #include "timeline.h" +#include "wx_util.h" #include <wx/wx.h> #include <wx/graphics.h> @@ -56,23 +57,7 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (0, 0, 0), 1, wxPENSTYLE_SOLID)); - double mark_interval = rint (128 / pps); - if (mark_interval > 5) { - mark_interval -= lrint (mark_interval) % 5; - } - if (mark_interval > 10) { - mark_interval -= lrint (mark_interval) % 10; - } - if (mark_interval > 60) { - mark_interval -= lrint (mark_interval) % 60; - } - if (mark_interval > 3600) { - mark_interval -= lrint (mark_interval) % 3600; - } - - if (mark_interval < 1) { - mark_interval = 1; - } + double const mark_interval = calculate_mark_interval (rint (128 / pps)); wxGraphicsPath path = gc->CreatePath (); path.MoveToPoint (_timeline.tracks_position().x, _y); |
