X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Ftimeline.cc;h=6bce881a42013f0eba980723aca09e95e8f6505e;hb=4fc504bb31bac8c79e5891b696b0b84d60649d05;hp=13baef6b7bb0c143021aeb67a97fe7dcc714127e;hpb=cb1dfa9ec09af2abf6d10e4bf2764476db83841b;p=dcpomatic.git diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 13baef6b7..6bce881a4 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -96,7 +96,7 @@ public: dcpomatic::Rect bbox () const { - assert (_track); + DCPOMATIC_ASSERT (_track); shared_ptr film = _timeline.film (); shared_ptr content = _content.lock (); @@ -145,7 +145,7 @@ private: void do_paint (wxGraphicsContext* gc) { - assert (_track); + DCPOMATIC_ASSERT (_track); shared_ptr film = _timeline.film (); shared_ptr cont = content (); @@ -715,7 +715,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev) DCPTime const d = DCPTime (cv->content()->end() - new_position).abs (); if (first || d < nearest_distance) { nearest_distance = d; - nearest_new_position = cv->content()->end(); + nearest_new_position = cv->content()->end() + DCPTime::delta (); } } @@ -727,7 +727,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev) if (d < nearest_distance) { nearest_distance = d; - nearest_new_position = cv->content()->position() - _down_view->content()->length_after_trim (); + nearest_new_position = cv->content()->position() - _down_view->content()->length_after_trim () - DCPTime::delta(); } } @@ -749,7 +749,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev) _down_view->content()->set_position (new_position); shared_ptr film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); film->set_sequence_video (false); }