Make popout frame handle hiding the splitstackframe
This commit is contained in:
parent
06e0a51325
commit
b8a0891478
|
@ -70,10 +70,7 @@ function ns.NewMainFrame()
|
|||
GVS:RegisterEvent("MERCHANT_UPDATE")
|
||||
GVS:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
|
||||
end)
|
||||
GVS:SetScript("OnHide", function()
|
||||
GVS:UnregisterAllEvents()
|
||||
if StackSplitFrame:IsVisible() then StackSplitFrame:Hide() end
|
||||
end)
|
||||
GVS:SetScript("OnHide", GVS.UnregisterAllEvents)
|
||||
|
||||
return GVS
|
||||
end
|
||||
|
|
|
@ -16,6 +16,11 @@ local function OnClick(self, button)
|
|||
end
|
||||
|
||||
|
||||
local function OnHide()
|
||||
if StackSplitFrame:IsVisible() then StackSplitFrame:Hide() end
|
||||
end
|
||||
|
||||
|
||||
local function PopoutSplitStack(self, qty)
|
||||
ns.Purchase(self:GetParent():GetID(), qty)
|
||||
end
|
||||
|
@ -30,6 +35,7 @@ function ns.NewQtyPopoutFrame(parent)
|
|||
frame:GetHighlightTexture():SetTexCoord(0.15625, 1, 0.84375, 1, 0.15625, 0.5, 0.84375, 0.5)
|
||||
|
||||
frame:SetScript("OnClick", OnClick)
|
||||
frame:SetScript("OnHide", OnHide)
|
||||
|
||||
frame.SplitStack = PopoutSplitStack
|
||||
|
||||
|
|
Loading…
Reference in New Issue