X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.cc;h=c1713bb61262e2bcc27047a60eadb2b9186baf47;hb=0a93237cb5e4642d3b698ff9b7d0cfae5401478c;hp=9c70a001e0bc2709ebfea53cfe91fa02568056a6;hpb=ccc9147af71ea93195b10e0f6de040fff9ae7746;p=dcpomatic.git diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 9c70a001e..c1713bb61 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -142,7 +142,7 @@ Timeline::playlist_content_changed (int property) setup_pixels_per_second (); } Refresh (); - } else if (property == AudioContentProperty::AUDIO_MAPPING) { + } else if (property == AudioContentProperty::AUDIO_STREAMS) { recreate_views (); } } @@ -363,7 +363,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev) if (_snap) { - DCPTime const new_end = new_position + _down_view->content()->length_after_trim () - 1; + DCPTime const new_end = new_position + _down_view->content()->length_after_trim () - DCPTime (1); /* Signed `distance' to nearest thing (i.e. negative is left on the timeline, positive is right). */ @@ -377,9 +377,9 @@ Timeline::set_position_from_event (wxMouseEvent& ev) } maybe_snap (cv->content()->position(), new_position, nearest_distance); - maybe_snap (cv->content()->position(), new_end + 1, nearest_distance); - maybe_snap (cv->content()->end() + 1, new_position, nearest_distance); - maybe_snap (cv->content()->end() + 1, new_end, nearest_distance); + maybe_snap (cv->content()->position(), new_end + DCPTime (1), nearest_distance); + maybe_snap (cv->content()->end() + DCPTime (1), new_position, nearest_distance); + maybe_snap (cv->content()->end() + DCPTime (1), new_end, nearest_distance); } if (nearest_distance) {