PlainText -> PlainTextFile.
[dcpomatic.git] / src / wx / timing_panel.cc
index 653e4466955e55e880683cb054ee2daaa84afad7..93ac0278438bac6ff8932f4e0ecaa094fc123be3 100644 (file)
 #include "move_to_dialog.h"
 #include "lib/content.h"
 #include "lib/image_content.h"
-#include "lib/subtitle_content.h"
-#include "lib/dcp_subtitle_content.h"
+#include "lib/text_content.h"
+#include "lib/dcp_text_content.h"
 #include "lib/audio_content.h"
-#include "lib/text_subtitle_content.h"
+#include "lib/plain_text_file_content.h"
 #include "lib/video_content.h"
 #include <dcp/locale_convert.h>
 #include <boost/foreach.hpp>
@@ -395,7 +395,7 @@ TimingPanel::play_length_changed ()
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
                FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
                i->set_trim_end (
-                       ContentTime (i->full_length() - play_length, frc) - i->trim_start ()
+                       ContentTime (max(DCPTime(), i->full_length() - play_length), frc) - i->trim_start ()
                        );
        }
 }