View Single Post
08/20/14, 07:43 AM   #1
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
[fixed] Fix Quickslot inventory ordering

When you go to Inventory -> Quickslots, items are not ordered by Name properly. It take several clicks on Name to get them sorted (if you're lucky).

Reason is entries don't have itemData.name when the list is sorted for the first time. You initialize it in ZO_QuickslotManager:SetUpQuickSlot, but that means only items in visible slots get a name (after the sort), the rest is still unsortable. Thus it requires several clicks on Name (switching ascending/descending order) or scrolling through the whole list to get item names.

Easy fix:
Lua Code:
  1. function ZO_QuickslotManager:UpdateList()
  2.    ...
  3.    local itemData = {
  4.       name = slotData.name,
  5.       ...
  6.    }

Lua Code:
  1. function ZO_QuickslotManager:SetUpQuickSlot(control, data)
  2.    ...
  3.    -- remove this line
  4.    data.name = data.name or zo_strformat(SI_TOOLTIP_ITEM_NAME, GetItemName(data.bagId, data.slotIndex))