Skip to content

Commit

Permalink
Fixed locked item indicator not updating when changing sets.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckaotik committed Aug 6, 2015
1 parent 7d336f7 commit 6e1293d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion TopFit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ function ns:SetSelectedSet(setID)
end
end

ns.ui.Update(true)
ns.ui.UpdateForcedSlotIndicators() -- character frame ui
ns.ui.Update(true) -- topfit frame ui
end

-- get a list of all set IDs in the database
Expand Down
18 changes: 14 additions & 4 deletions modules/ui.character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,21 @@ local function UpdateForcedSlotIndicator(slotButton)
indicator:Hide()
end
end
hooksecurefunc("PaperDollItemSlotButton_OnShow", function(self, isBag)
if not isBag then
UpdateForcedSlotIndicator(self)

local paperDollItemButtons = {}
for _, button in pairs({ PaperDollItemsFrame:GetChildren() }) do
local slotID = button.GetID and button:GetID() or nil
if slotID then
paperDollItemButtons[slotID] = button
end
end)
end
function ui.UpdateForcedSlotIndicators(slot)
for slotID, slotButton in pairs(paperDollItemButtons) do
if not slot or slot == slotID then
UpdateForcedSlotIndicator(slotButton)
end
end
end

-- ----------------------------------------------
-- item flyout forcing
Expand Down

0 comments on commit 6e1293d

Please sign in to comment.