Fix sensitivity of 'refer' button in the subtitle panel.
authorCarl Hetherington <cth@carlh.net>
Thu, 17 Sep 2015 20:39:40 +0000 (21:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 17 Sep 2015 20:39:40 +0000 (21:39 +0100)
src/wx/subtitle_panel.cc

index d2f0e4c111e3b1f7e013c7654fd12140e7ad271d..bd5c5f636c039626d46515d8f48f63e6ad6a974d 100644 (file)
@@ -255,6 +255,9 @@ SubtitlePanel::setup_sensitivity ()
        _stream->Enable (!reference && ffmpeg_subs == 1);
        _subtitle_view_button->Enable (!reference && subrip_or_dcp_subs == 1);
        _fonts_dialog_button->Enable (!reference && subrip_or_dcp_subs == 1);
+
+       ContentList sel = _parent->selected ();
+       _reference->Enable (sel.size() == 1 && dynamic_pointer_cast<DCPContent> (sel.front ()));
 }
 
 void