changed where the bag event was registered
This commit is contained in:
@@ -7,6 +7,6 @@
|
|||||||
## X-Category: Profession
|
## X-Category: Profession
|
||||||
## X-OptionsFrame: ProfessionMenuOptionsFrame
|
## X-OptionsFrame: ProfessionMenuOptionsFrame
|
||||||
## DefaultState: enabled
|
## DefaultState: enabled
|
||||||
## Version: 1.0
|
## Version: 1.1
|
||||||
|
|
||||||
embeds.xml
|
embeds.xml
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local mainframe = CreateFrame("FRAME", "ProfessionMenuExtractFrame", UIParent,"U
|
|||||||
mainframe:SetScript("OnDragStop", function(self) mainframe:StopMovingOrSizing() end)
|
mainframe:SetScript("OnDragStop", function(self) mainframe:StopMovingOrSizing() end)
|
||||||
mainframe:SetScript("OnShow", function()
|
mainframe:SetScript("OnShow", function()
|
||||||
PM:SearchBags()
|
PM:SearchBags()
|
||||||
PM:RegisterEvent("BAG_UPDATE", PM.SearchBags)
|
PM:RegisterEvent("BAG_UPDATE")
|
||||||
end)
|
end)
|
||||||
mainframe:SetScript("OnHide", function()
|
mainframe:SetScript("OnHide", function()
|
||||||
PM:UnregisterEvent("BAG_UPDATE")
|
PM:UnregisterEvent("BAG_UPDATE")
|
||||||
@@ -45,11 +45,9 @@ local InventoryTypes = {
|
|||||||
function PM:InventoryFrame_Open(isEnabled)
|
function PM:InventoryFrame_Open(isEnabled)
|
||||||
if not isEnabled then return end
|
if not isEnabled then return end
|
||||||
if mainframe:IsVisible() then
|
if mainframe:IsVisible() then
|
||||||
PM:UnregisterEvent("BAG_UPDATE")
|
|
||||||
mainframe:Hide()
|
mainframe:Hide()
|
||||||
else
|
else
|
||||||
mainframe:Show()
|
mainframe:Show()
|
||||||
PM:RegisterEvent("BAG_UPDATE")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user