X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.cc;h=6bce881a42013f0eba980723aca09e95e8f6505e;hb=4fc504bb31bac8c79e5891b696b0b84d60649d05;hp=1096a435aa5b7386e28ef1419e46e90621a342b9;hpb=cc27c2716f755305d67f1e1ba828ecf37f8405dd;p=dcpomatic.git diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 1096a435a..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 (); @@ -213,6 +213,9 @@ private: boost::signals2::scoped_connection _content_connection; }; +/** @class AudioContentView + * @brief Timeline view for AudioContent. + */ class AudioContentView : public ContentView { public: @@ -237,6 +240,9 @@ private: } }; +/** @class AudioContentView + * @brief Timeline view for VideoContent. + */ class VideoContentView : public ContentView { public: @@ -266,6 +272,9 @@ private: } }; +/** @class AudioContentView + * @brief Timeline view for SubtitleContent. + */ class SubtitleContentView : public ContentView { public: @@ -706,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 (); } } @@ -718,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(); } } @@ -740,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); }