Give an error if 2D content is set to 3D (#1565). Also run
[dcpomatic.git] / src / wx / film_viewer.cc
index b99bea6f7f2a84dd1a3e626ec8d685a6a4fbf0e0..25665325dd34933d3d56f46ba6a94b9a156164fa 100644 (file)
@@ -84,7 +84,7 @@ FilmViewer::FilmViewer (wxWindow* p)
        , _playing (false)
        , _latency_history_count (0)
        , _dropped (0)
-       , _closed_captions_dialog (new ClosedCaptionsDialog(p))
+       , _closed_captions_dialog (new ClosedCaptionsDialog(p, this))
        , _outline_content (false)
        , _eyes (EYES_LEFT)
        , _pad_black (false)
@@ -201,7 +201,7 @@ FilmViewer::recreate_butler ()
                _butler->disable_audio ();
        }
 
-       _closed_captions_dialog->set_butler (_butler);
+       _closed_captions_dialog->set_film_and_butler (_film, _butler);
 
        if (was_running) {
                start ();
@@ -234,7 +234,11 @@ FilmViewer::get ()
                _player_video.first->eyes() != EYES_BOTH
                );
 
-       _butler->rethrow ();
+       try {
+               _butler->rethrow ();
+       } catch (DecodeError& e) {
+               error_dialog (_video_view->get(), e.what());
+       }
 
        display_player_video ();
 }
@@ -393,7 +397,7 @@ FilmViewer::paint_panel ()
                dc.SetBrush (b);
                int const gap = (_panel_size.height - _out_size.height) / 2;
                dc.DrawRectangle (0, 0, _panel_size.width, gap);
-               dc.DrawRectangle (0, gap + _out_size.height + 1, _panel_size.width, gap);
+               dc.DrawRectangle (0, gap + _out_size.height + 1, _panel_size.width, gap + 1);
        }
 
        if (_outline_content) {