Skip to content

Commit

Permalink
Fix error when toggling 'Include Enchants' in trader
Browse files Browse the repository at this point in the history
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
  • Loading branch information
teroshan committed Apr 14, 2024
1 parent ca87ac7 commit 99b7524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Classes/TradeQuery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 99b7524

Please sign in to comment.