diff --git a/gui/options.cpp b/gui/options.cpp index 780670e..101308e 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -269,7 +269,7 @@ void OptionsDialog::open() { int speed; int sliderMaxValue = _subSpeedSlider->getMaxValue(); - _subMode = getSubtitleMode(ConfMan.getBool("subtitles", _domain), ConfMan.getBool("speech_mute", _domain)); + int _subMode = getSubtitleMode(ConfMan.getBool("subtitles", _domain), ConfMan.getBool("speech_mute", _domain)); _subToggleGroup->setValue(_subMode); // Engines that reuse the subtitle speed widget set their own max value. @@ -401,7 +401,7 @@ void OptionsDialog::close() { int talkspeed; int sliderMaxValue = _subSpeedSlider->getMaxValue(); - switch (_subMode) { + switch (_subToggleGroup->getValue()) { case kSubtitlesSpeech: subtitles = speech_mute = false; break; diff --git a/gui/options.h b/gui/options.h index fab25eb..cc62a30 100644 --- a/gui/options.h +++ b/gui/options.h @@ -125,7 +125,6 @@ private: RadiobuttonWidget *_subToggleSubOnly; RadiobuttonWidget *_subToggleSpeechOnly; RadiobuttonWidget *_subToggleSubBoth; - int _subMode; static const char *_subModeDesc[]; static const char *_lowresSubModeDesc[]; StaticTextWidget *_subSpeedDesc;