diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-12-22 18:25:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-12 23:41:00 +0100 |
| commit | ffc489c67f97366016e51de9390eb3f6841ad069 (patch) | |
| tree | 3bbc5554452ae312140d7d5d34ad967b289716d3 /src/wx/content_timeline.cc | |
| parent | 0adb508ce5fbc69a4324b7278ac245f28095d38c (diff) | |
Extract snap subdivision to a constant.
Diffstat (limited to 'src/wx/content_timeline.cc')
| -rw-r--r-- | src/wx/content_timeline.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/content_timeline.cc b/src/wx/content_timeline.cc index 7257f3587..663f93030 100644 --- a/src/wx/content_timeline.cc +++ b/src/wx/content_timeline.cc @@ -32,6 +32,7 @@ #include "wx_util.h" #include "lib/atmos_mxf_content.h" #include "lib/audio_content.h" +#include "lib/constants.h" #include "lib/film.h" #include "lib/image_content.h" #include "lib/playlist.h" @@ -845,7 +846,7 @@ ContentTimeline::set_position_from_event(wxMouseEvent& ev, bool force_emit) if (nearest_distance) { /* Snap if it's close; `close' means within a proportion of the time on the timeline */ - if (nearest_distance.get().abs() < DCPTime::from_seconds ((width() / pps) / 64)) { + if (nearest_distance.get().abs() < DCPTime::from_seconds ((width() / pps) / SNAP_SUBDIVISION)) { new_position += nearest_distance.get (); } } |
