summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-16 12:21:08 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-16 12:21:08 +0000
commita04c8a1b74c885a16327305ec1cc1ecd2b7ee0d6 (patch)
treeb6eab3d7b94b82834aff759026ca233b46e1b27a /src
parent008096491dfda7682a8d60105195202d365957c6 (diff)
Snap content to reel_split_points.
Diffstat (limited to 'src')
-rw-r--r--src/wx/timeline.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 8dee9610f..0e6f95d51 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -374,7 +374,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
*/
optional<DCPTime> nearest_distance;
- /* Find the nearest content edge; this is inefficient */
+ /* Find the nearest snap point; this is inefficient */
for (TimelineViewList::iterator i = _views.begin(); i != _views.end(); ++i) {
shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i);
if (!cv || cv == _down_view || cv->content() == _down_view->content()) {
@@ -385,6 +385,10 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
maybe_snap (cv->content()->position(), new_end, nearest_distance);
maybe_snap (cv->content()->end(), new_position, nearest_distance);
maybe_snap (cv->content()->end(), new_end, nearest_distance);
+
+ BOOST_FOREACH (DCPTime i, cv->content()->reel_split_points()) {
+ maybe_snap (i, new_position, nearest_distance);
+ }
}
if (nearest_distance) {