changed where the bag event was registered
This commit is contained in:
parent
810f8de13a
commit
4fd01d7681
2 changed files with 2 additions and 4 deletions
|
|
@ -7,6 +7,6 @@
|
|||
## X-Category: Profession
|
||||
## X-OptionsFrame: ProfessionMenuOptionsFrame
|
||||
## DefaultState: enabled
|
||||
## Version: 1.0
|
||||
## Version: 1.1
|
||||
|
||||
embeds.xml
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ local mainframe = CreateFrame("FRAME", "ProfessionMenuExtractFrame", UIParent,"U
|
|||
mainframe:SetScript("OnDragStop", function(self) mainframe:StopMovingOrSizing() end)
|
||||
mainframe:SetScript("OnShow", function()
|
||||
PM:SearchBags()
|
||||
PM:RegisterEvent("BAG_UPDATE", PM.SearchBags)
|
||||
PM:RegisterEvent("BAG_UPDATE")
|
||||
end)
|
||||
mainframe:SetScript("OnHide", function()
|
||||
PM:UnregisterEvent("BAG_UPDATE")
|
||||
|
|
@ -45,11 +45,9 @@ local InventoryTypes = {
|
|||
function PM:InventoryFrame_Open(isEnabled)
|
||||
if not isEnabled then return end
|
||||
if mainframe:IsVisible() then
|
||||
PM:UnregisterEvent("BAG_UPDATE")
|
||||
mainframe:Hide()
|
||||
else
|
||||
mainframe:Show()
|
||||
PM:RegisterEvent("BAG_UPDATE")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue