Update subtitle / timing panels properly.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 Nov 2013 14:12:31 +0000 (14:12 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 14 Nov 2013 14:12:31 +0000 (14:12 +0000)
src/wx/subtitle_panel.cc
src/wx/timing_panel.cc

index c820220d4940bb9db8abd75bed68d3bd1f3343b5..0e3f2e89d389d8d25da1c3dfe43ae5817084f443 100644 (file)
@@ -195,7 +195,7 @@ SubtitlePanel::scale_changed ()
 void
 SubtitlePanel::content_selection_changed ()
 {
-
+       film_content_changed (FFmpegContentProperty::SUBTITLE_STREAMS);
+       film_content_changed (SubtitleContentProperty::SUBTITLE_OFFSET);
+       film_content_changed (SubtitleContentProperty::SUBTITLE_SCALE);
 }
-
-       
index 512a83cd9cec1e18863216df6695b278e767eb59..57eb96af0e5e68bb70c03f33211b1ebc4da32ff1 100644 (file)
@@ -134,5 +134,17 @@ TimingPanel::trim_end_changed ()
 void
 TimingPanel::content_selection_changed ()
 {
-
+       VideoContentList sel = _editor->selected_video_content ();
+       bool const single = sel.size() == 1;
+
+       /* Things that are only allowed with single selections */
+       _position->Enable (single);
+       _length->Enable (single);
+       _trim_start->Enable (single);
+       _trim_end->Enable (single);
+       
+       film_content_changed (ContentProperty::POSITION);
+       film_content_changed (ContentProperty::LENGTH);
+       film_content_changed (ContentProperty::TRIM_START);
+       film_content_changed (ContentProperty::TRIM_END);
 }