Fixed speedrun timer checkbox visibility.

Using both setActive() and setVisible() together doesn't have much sense.
Especially that in init function the checkbox was made invisible, but in
eventCallback it was only made active, but still kept invisible.
This commit is contained in:
Deve 2019-11-28 22:16:28 +01:00
parent a07ca7f365
commit 771f37138c

View File

@ -257,7 +257,10 @@ void OptionsScreenUI::init()
else
{
story_timer->setActive(true);
speedrun_timer->setActive(true);
speedrun_timer->setActive(UserConfigParams::m_display_story_mode_timer);
getWidget<LabelWidget>("speedrun-timer-text")
->setActive(UserConfigParams::m_display_story_mode_timer);
}
if (UserConfigParams::m_speedrun_mode)
{
@ -274,9 +277,6 @@ void OptionsScreenUI::init()
}
}
speedrun_timer->setState( UserConfigParams::m_speedrun_mode );
speedrun_timer->setVisible( UserConfigParams::m_display_story_mode_timer );
getWidget<LabelWidget>("speedrun-timer-text")
->setVisible(UserConfigParams::m_display_story_mode_timer);
// --- select the right skin in the spinner
bool currSkinFound = false;