Fix error when toggling 'Include Enchants' in trader (#7572)

It seems like the UpdateControlsWithItems() has been refactored right
when this checkbox has been added, changing the expected argument
format.

No other callers use the obsolete arguments.

Fixes #6216
This commit is contained in:
teroshan
2024-06-27 12:44:42 +02:00
committed by GitHub
parent 9df62bd6ec
commit e1ee0cec3f

View File

@@ -345,12 +345,12 @@ Lowest Price - Sorts from lowest to highest price of retrieved items
Highest Weight - Displays the order retrieved from trade]]
self.controls.itemSortSelection:SetSel(self.pbItemSortSelectionIndex)
self.controls.itemSortSelectionLabel = new("LabelControl", {"TOPRIGHT", self.controls.itemSortSelection, "TOPLEFT"}, -4, 0, 60, 16 , "^7Sort By:")
-- Use Enchant in DPS sorting
self.controls.enchantInSort = new("CheckBoxControl", {"TOPRIGHT",self.controls.fetchCountEdit,"TOPLEFT"}, -8, 0, row_height, "Include Enchants:", function(state)
self.enchantInSort = state
for index, _ in pairs(self.resultTbl) do
self:UpdateControlsWithItems({name = baseSlots[index]}, index)
for row_idx, _ in pairs(self.resultTbl) do
self:UpdateControlsWithItems(row_idx)
end
end)
self.controls.enchantInSort.tooltipText = "This includes enchants in sorting that occurs after trade results have been retrieved"