Fix incorrect handling of force-effect in subtitle appearance.
authorCarl Hetherington <cth@carlh.net>
Fri, 8 Jun 2018 12:10:19 +0000 (13:10 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 8 Jun 2018 12:10:19 +0000 (13:10 +0100)
src/wx/subtitle_appearance_dialog.cc

index 8ae99bc..8ae4797 100644 (file)
@@ -210,16 +210,20 @@ SubtitleAppearanceDialog::apply ()
        } else {
                _content->subtitle->unset_colour ();
        }
-       switch (_effect->GetSelection()) {
-       case NONE:
-               _content->subtitle->set_effect (dcp::NONE);
-               break;
-       case OUTLINE:
-               _content->subtitle->set_effect (dcp::BORDER);
-               break;
-       case SHADOW:
-               _content->subtitle->set_effect (dcp::SHADOW);
-               break;
+       if (_force_effect->GetValue()) {
+               switch (_effect->GetSelection()) {
+               case NONE:
+                       _content->subtitle->set_effect (dcp::NONE);
+                       break;
+               case OUTLINE:
+                       _content->subtitle->set_effect (dcp::BORDER);
+                       break;
+               case SHADOW:
+                       _content->subtitle->set_effect (dcp::SHADOW);
+                       break;
+               }
+       } else {
+               _content->subtitle->unset_effect ();
        }
        if (_force_effect_colour->GetValue ()) {
                wxColour const ec = _effect_colour->GetColour ();