Preferences: Keep the acceleration speed slider enabled even when the checkbox is disabled.

Apparently, this also causes the slider's value to be saved when dismissing the dialog with the checkbox disabled.

Fixes #2741
This commit is contained in:
josteph 2018-06-16 10:11:19 +00:00 committed by Charles Dang
parent 2771582222
commit e126e5ba36

View file

@ -359,8 +359,7 @@ void preferences_dialog::post_build(window& window)
scroll_speed, set_scroll_speed);
/* ACCELERATED SPEED */
register_bool("turbo_toggle", true, turbo, set_turbo,
[&](widget& w) { disable_widget_on_toggle<slider>(window, w, "turbo_slider"); }, true);
register_bool("turbo_toggle", true, turbo, set_turbo);
const auto accl_load = [this]()->int {
return std::distance(accl_speeds_.begin(), std::find(accl_speeds_.begin(), accl_speeds_.end(), turbo_speed()));