Skip to content

Commit 9f77b00

Browse files
author
LocalIdentity
committed
Avoid reapplying active loadout sets
Only switch tree, item, skill, and config sets when the selected loadout uses a different set from the currently active one. This restores the previous loadout switching behaviour and prevents build initialisation from reprocessing stale tab state from the prior build, which caused the test suite to fail when resetting between skill tests.
1 parent 56e20ad commit 9f77b00

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/Modules/Build.lua

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -939,10 +939,18 @@ function buildMode:SetActiveLoadout(loadout)
939939
return
940940
end
941941

942-
self.treeTab:SetActiveSpec(newSpecId, true)
943-
self.itemsTab:SetActiveItemSet(newItemId, true)
944-
self.skillsTab:SetActiveSkillSet(newSkillId, true)
945-
self.configTab:SetActiveConfigSet(newConfigId, false, true)
942+
if newSpecId ~= self.treeTab.activeSpec then
943+
self.treeTab:SetActiveSpec(newSpecId, true)
944+
end
945+
if newItemId ~= self.itemsTab.activeItemSetId then
946+
self.itemsTab:SetActiveItemSet(newItemId, true)
947+
end
948+
if newSkillId ~= self.skillsTab.activeSkillSetId then
949+
self.skillsTab:SetActiveSkillSet(newSkillId, true)
950+
end
951+
if newConfigId ~= self.configTab.activeConfigSetId then
952+
self.configTab:SetActiveConfigSet(newConfigId, false, true)
953+
end
946954
self:SyncLoadouts()
947955
end
948956

0 commit comments

Comments
 (0)