Cleanup: move some methods from util to maths_util.
[dcpomatic.git] / src / wx / audio_panel.cc
index a77922ed20a8d4475affcfb2eb460864cb231436..af030e9156af37525aa4ef70cd6fbee23f703758 100644 (file)
@@ -35,6 +35,7 @@
 #include "lib/job_manager.h"
 #include "lib/dcp_content.h"
 #include "lib/audio_content.h"
+#include "lib/maths_util.h"
 #include <wx/spinctrl.h>
 #include <iostream>
 
@@ -56,6 +57,13 @@ using namespace boost::placeholders;
 AudioPanel::AudioPanel (ContentPanel* p)
        : ContentSubPanel (p, _("Audio"))
        , _audio_dialog (0)
+{
+
+}
+
+
+void
+AudioPanel::create ()
 {
        _reference = new CheckBox (this, _("Use this DCP's audio as OV and make VF"));
        _reference_note = new StaticText (this, wxT(""));
@@ -119,6 +127,8 @@ AudioPanel::AudioPanel (ContentPanel* p)
        _active_jobs_connection = JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&AudioPanel::active_jobs_changed, this, _1, _2));
 
        add_to_grid ();
+
+       _sizer->Layout ();
 }
 
 void
@@ -218,7 +228,7 @@ AudioPanel::film_content_changed (int property)
                }
                setup_description ();
                setup_peak ();
-               _sizer->Layout ();
+               layout ();
        } else if (property == AudioContentProperty::GAIN) {
                setup_peak ();
        } else if (property == DCPContentProperty::REFERENCE_AUDIO) {