Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions spec/System/TestImportReimport_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,24 @@ Fireball 20/0 1
assert.is_false(groupsByGem.Fireball.enabled)
end)

it("clears the stale socket group selection when reimporting skills", function()
build.skillsTab:PasteSocketGroup([[
Fireball 20/0 1
]])
runCallback("OnFrame")

local oldSocketGroup = build.skillsTab.socketGroupList[1]
assert.are.equal(oldSocketGroup, build.skillsTab.displayGroup)
assert.are.equal(oldSocketGroup, build.skillsTab.controls.groupList.selValue)

reimportSingleGem("Linen Wraps", "Gloves", "Dark Effigy")

assert.is_nil(build.skillsTab.displayGroup)
assert.is_nil(build.skillsTab.controls.groupList.selIndex)
assert.is_nil(build.skillsTab.controls.groupList.selValue)
assert.are_not.equal(oldSocketGroup, build.skillsTab.socketGroupList[1])
end)

it("imports item socketed jewels using jewel socket order instead of raw socket index", function()
build.importTab.controls.charImportItemsClearItems.state = true
build.importTab.controls.charImportItemsClearSkills.state = true
Expand Down
3 changes: 3 additions & 0 deletions src/Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,9 @@ function ImportTabClass:ImportItemsAndSkills(charData)
t_insert(preservedSocketGroupStateByKey[key], snapshotSocketGroupReimportState(socketGroup, index == self.build.mainSocketGroup))
end
wipeTable(self.build.skillsTab.socketGroupList)
self.build.skillsTab.controls.groupList.selIndex = nil
self.build.skillsTab.controls.groupList.selValue = nil
self.build.skillsTab:SetDisplayGroup()
end
self.charImportStatus = colorCodes.POSITIVE.."Items and skills successfully imported."
--ConPrintTable(charItemData)
Expand Down
Loading