Skip to content

Commit

Permalink
Fix stale page list after changing "enable_touch"
Browse files Browse the repository at this point in the history
The "Keyboard and Mouse" page is only shown if "!enable_touch",
so the page list needs to be regenerated when "enable_touch" changes.
  • Loading branch information
grorp authored and okias committed Jan 7, 2024
1 parent 2ecc37b commit 3844dcd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin/mainmenu/settings/dlg_settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,14 @@ local function buttonhandler(this, fields)
if fields.show_advanced ~= nil then
local value = core.is_yes(fields.show_advanced)
core.settings:set_bool("show_advanced", value)
end

if fields.enable_touch ~= nil then
local value = core.is_yes(fields.enable_touch)
core.settings:set_bool("enable_touch", value)
end

if fields.show_advanced ~= nil or fields.enable_touch ~= nil then
local suggested_page_id = update_filtered_pages(dialogdata.query)

if not filtered_page_by_id[dialogdata.page_id] then
Expand Down

0 comments on commit 3844dcd

Please sign in to comment.