Skip to content

Commit 2e40a11

Browse files
authored
Merge pull request #139 from burgerhex/favorites
Fix preset "replace" crash
2 parents dbf6e53 + 082fd79 commit 2e40a11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scenes/modlist.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ local function handleModEnabledStateChange(mod, enabling)
319319
updateLabelTextForDependencies(mod)
320320
updateWarningButtonForMod(mod)
321321
updateWarningButtonForDependents(mod)
322-
updateEnabledModCountLabel()
323322
end
324323

325324
-- enable mods on the UI
@@ -330,6 +329,7 @@ local function enableMods(mods)
330329
end
331330
end
332331

332+
updateEnabledModCountLabel()
333333
writeBlacklist()
334334
end
335335

@@ -346,6 +346,7 @@ local function disableMods(mods)
346346
end
347347
end
348348

349+
updateEnabledModCountLabel()
349350
writeBlacklist()
350351
end
351352

@@ -687,7 +688,7 @@ end
687688
-- disables all mods then enables mods from preset
688689
local function applyPreset(name, disableAll)
689690
if disableAll then
690-
disableAllMods()
691+
disableMods(scene.modsByPath)
691692
end
692693
name = name:gsub("%p", "%%%1") -- escape special characters
693694
local root = config.installs[config.install].path

0 commit comments

Comments
 (0)