Cleanup: remove some unnecessary includes.
[dcpomatic.git] / src / wx / timing_panel.cc
index a78e3bdd4fe04f82bf027360cb13074b6777d48b..890049ae92826657d66e5a602c8e6aa4787ab04b 100644 (file)
@@ -33,6 +33,7 @@
 #include "lib/dcp_subtitle_content.h"
 #include "lib/ffmpeg_content.h"
 #include "lib/image_content.h"
+#include "lib/scope_guard.h"
 #include "lib/string_text_file_content.h"
 #include "lib/text_content.h"
 #include "lib/video_content.h"
@@ -365,7 +366,7 @@ TimingPanel::trim_start_changed ()
                }
 
                ContentTime const trim = _trim_start->get (i->video_frame_rate().get_value_or(_parent->film()->video_frame_rate()));
-               i->set_trim_start (trim);
+               i->set_trim_start(_parent->film(), trim);
        }
 
        if (ref) {
@@ -440,7 +441,7 @@ TimingPanel::trim_start_to_playhead_clicked ()
        for (auto i: _parent->selected()) {
                if (i->position() < ph && ph < i->end(film)) {
                        FrameRateChange const frc = film->active_frame_rate_change (i->position());
-                       i->set_trim_start (i->trim_start() + ContentTime (ph - i->position(), frc));
+                       i->set_trim_start(film, i->trim_start() + ContentTime(ph - i->position(), frc));
                        new_ph = i->position ();
                }
        }
@@ -506,12 +507,11 @@ TimingPanel::move_to_start_of_reel_clicked ()
                }
        }
 
-       auto d = new MoveToDialog(this, position, _parent->film());
+       auto d = make_wx<MoveToDialog>(this, position, _parent->film());
 
        if (d->ShowModal() == wxID_OK) {
                for (auto i: _parent->selected()) {
                        i->set_position (_parent->film(), d->position());
                }
        }
-       d->Destroy ();
 }