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("MERCHANT_UPDATE")
|
||||||
GVS:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
|
GVS:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
|
||||||
end)
|
end)
|
||||||
GVS:SetScript("OnHide", function()
|
GVS:SetScript("OnHide", GVS.UnregisterAllEvents)
|
||||||
GVS:UnregisterAllEvents()
|
|
||||||
if StackSplitFrame:IsVisible() then StackSplitFrame:Hide() end
|
|
||||||
end)
|
|
||||||
|
|
||||||
return GVS
|
return GVS
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,6 +16,11 @@ local function OnClick(self, button)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function OnHide()
|
||||||
|
if StackSplitFrame:IsVisible() then StackSplitFrame:Hide() end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function PopoutSplitStack(self, qty)
|
local function PopoutSplitStack(self, qty)
|
||||||
ns.Purchase(self:GetParent():GetID(), qty)
|
ns.Purchase(self:GetParent():GetID(), qty)
|
||||||
end
|
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:GetHighlightTexture():SetTexCoord(0.15625, 1, 0.84375, 1, 0.15625, 0.5, 0.84375, 0.5)
|
||||||
|
|
||||||
frame:SetScript("OnClick", OnClick)
|
frame:SetScript("OnClick", OnClick)
|
||||||
|
frame:SetScript("OnHide", OnHide)
|
||||||
|
|
||||||
frame.SplitStack = PopoutSplitStack
|
frame.SplitStack = PopoutSplitStack
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue