X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.cc;h=556e6f1b3e08ca44c2108c27cd001a4cb02c2c29;hb=b6c780d3107557d452c6612d715d01e2be52dbda;hp=d728bd47c11349b5dea1ed079e0b6cefb3c397d3;hpb=e8c5f14cb6736bdfa3610b2559c6c331c1c56984;p=dcpomatic.git diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index d728bd47c..556e6f1b3 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -25,6 +25,7 @@ #include "lib/image_content.h" #include "film_editor.h" #include "timeline.h" +#include "content_panel.h" #include "wx_util.h" using std::list; @@ -212,6 +213,9 @@ private: boost::signals2::scoped_connection _content_connection; }; +/** @class AudioContentView + * @brief Timeline view for AudioContent. + */ class AudioContentView : public ContentView { public: @@ -236,6 +240,9 @@ private: } }; +/** @class AudioContentView + * @brief Timeline view for VideoContent. + */ class VideoContentView : public ContentView { public: @@ -265,6 +272,9 @@ private: } }; +/** @class AudioContentView + * @brief Timeline view for SubtitleContent. + */ class SubtitleContentView : public ContentView { public: @@ -705,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 (); } } @@ -717,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(); } }