Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
[dcpomatic.git] / src / wx / video_waveform_dialog.cc
index 412ebf8bb7482a67625ae084a256220ee10fb706..c38dbf65d98a0d9b52ba44a64640a4a6b505aca1 100644 (file)
@@ -36,7 +36,14 @@ VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr<const Film>
                _("Video Waveform"),
                wxDefaultPosition,
                wxSize (640, 512),
+#ifdef DCPOMATIC_OSX
+               /* I can't get wxFRAME_FLOAT_ON_PARENT to work on OS X, and although wxSTAY_ON_TOP keeps
+                  the window above all others (and not just our own) it's better than nothing for now.
+               */
+               wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxSTAY_ON_TOP
+#else
                wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxFRAME_FLOAT_ON_PARENT
+#endif
                )
        , _viewer (viewer)
 {
@@ -83,7 +90,7 @@ VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr<const Film>
        overall_sizer->SetSizeHints (this);
 
        Bind (wxEVT_SHOW, bind (&VideoWaveformDialog::shown, this, _1));
-       _component->Bind (wxEVT_COMMAND_CHOICE_SELECTED, bind (&VideoWaveformDialog::component_changed, this));
+       _component->Bind (wxEVT_CHOICE, bind (&VideoWaveformDialog::component_changed, this));
        _contrast->Bind (wxEVT_SCROLL_THUMBTRACK, bind (&VideoWaveformDialog::contrast_changed, this));
        _plot->MouseMoved.connect (bind (&VideoWaveformDialog::mouse_moved, this, _1, _2, _3, _4));
 
@@ -99,7 +106,7 @@ VideoWaveformDialog::shown (wxShowEvent& ev)
 {
        _plot->set_enabled (ev.IsShown ());
        if (ev.IsShown ()) {
-               _viewer->refresh ();
+               _viewer->slow_refresh ();
        }
 }