]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Main menu: Fix automatic dependency enables on doubleclick
authorSmallJoker <mk939@ymail.com>
Wed, 19 Jan 2022 17:52:27 +0000 (18:52 +0100)
committerSmallJoker <mk939@ymail.com>
Wed, 19 Jan 2022 17:52:27 +0000 (18:52 +0100)
When mods were toggled by double-click, the hard dependencies were no longer enabled automatically.
However, the 'Enabled' checkbox did still work. This commit restores the behaviour as seen before commit c401a06

builtin/mainmenu/pkgmgr.lua

index e83a93c91ca72bf53b33670ac21d8a4c7a19d3d1..6de6715296a4b42f2085a802806ceb70cc381ebb 100644 (file)
@@ -435,6 +435,7 @@ function pkgmgr.enable_mod(this, toset)
        local toggled_mods = {}
        local enabled_mods = {}
        toggle_mod_or_modpack(list, toggled_mods, enabled_mods, toset, mod)
+       toset = mod.enabled -- Update if toggled
 
        if not toset then
                -- Mod(s) were disabled, so no dependencies need to be enabled