Skip to content

Commit 4260e40

Browse files
FenikSRT4LocalIdentity
andcommitted
[ISSUE-9451] Loadout Management
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. Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 0b20cd8 commit 4260e40

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
@@ -980,10 +980,18 @@ function buildMode:SetActiveLoadout(loadout)
980980
return
981981
end
982982

983-
self.treeTab:SetActiveSpec(newSpecId, true)
984-
self.itemsTab:SetActiveItemSet(newItemId, true)
985-
self.skillsTab:SetActiveSkillSet(newSkillId, true)
986-
self.configTab:SetActiveConfigSet(newConfigId, false, true)
983+
if newSpecId ~= self.treeTab.activeSpec then
984+
self.treeTab:SetActiveSpec(newSpecId, true)
985+
end
986+
if newItemId ~= self.itemsTab.activeItemSetId then
987+
self.itemsTab:SetActiveItemSet(newItemId, true)
988+
end
989+
if newSkillId ~= self.skillsTab.activeSkillSetId then
990+
self.skillsTab:SetActiveSkillSet(newSkillId, true)
991+
end
992+
if newConfigId ~= self.configTab.activeConfigSetId then
993+
self.configTab:SetActiveConfigSet(newConfigId, false, true)
994+
end
987995
self:SyncLoadouts()
988996
end
989997

0 commit comments

Comments
 (0)