Extract Film::Property to its own header to (maybe) increase compilation speed.
[dcpomatic.git] / src / wx / timing_panel.cc
index 5b8adc4958bd7c1bb7782df49b2f32c7d5ec5d57..98060bb87322c0a64122d4587a469917fbf67e08 100644 (file)
@@ -32,7 +32,9 @@
 #include "lib/dcp_content.h"
 #include "lib/dcp_subtitle_content.h"
 #include "lib/ffmpeg_content.h"
+#include "lib/film.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"
@@ -420,9 +422,9 @@ TimingPanel::content_selection_changed ()
 }
 
 void
-TimingPanel::film_changed (Film::Property p)
+TimingPanel::film_changed(FilmProperty p)
 {
-       if (p == Film::Property::VIDEO_FRAME_RATE) {
+       if (p == FilmProperty::VIDEO_FRAME_RATE) {
                update_full_length ();
                update_play_length ();
        }
@@ -506,12 +508,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 ();
 }