Quantcast

Reanchor the menu every time we show it

Adrian L Lange [09-10-14 - 13:59]
Reanchor the menu every time we show it
Filename
Broker_Equipment.lua
diff --git a/Broker_Equipment.lua b/Broker_Equipment.lua
index c3cfffb..987d322 100644
--- a/Broker_Equipment.lua
+++ b/Broker_Equipment.lua
@@ -153,8 +153,7 @@ function LDB:OnClick(button)

 	if(button ~= 'RightButton' and GetNumEquipmentSets() > 0) then
 		if(not Menu) then
-			Menu = CreateFrame('Frame', nil, self)
-			Menu:SetPoint('TOP', self, 'BOTTOM')
+			Menu = CreateFrame('Frame', nil, UIParent)
 			Menu:SetBackdrop(BACKDROP)
 			Menu:SetBackdropColor(0, 0, 0)
 			Menu:SetScript('OnEnter', OnEnter)
@@ -174,6 +173,8 @@ function LDB:OnClick(button)
 			Menu:Hide()
 		else
 			UpdateMenu(self)
+			Menu:ClearAllPoints()
+			Menu:SetPoint('TOP', self, 'BOTTOM')
 			Menu:Show()
 		end