nameplates: only show visible nameplates

This commit is contained in:
shagu
2017-05-29 20:01:02 +02:00
parent 8cb1de900d
commit 57d1652292
+2 -1
View File
@@ -16,10 +16,11 @@ pfUI:RegisterModule("nameplates", function ()
if not nameplate.done and nameplate:GetObjectType() == "Button" then
local regions = nameplate:GetRegions()
if regions and regions:GetObjectType() == "Texture" and regions:GetTexture() == "Interface\\Tooltips\\Nameplate-Border" then
local visible = nameplate:IsVisible()
nameplate:Hide()
nameplate:SetScript("OnShow", pfUI.nameplates.CreateNameplate)
nameplate:SetScript("OnUpdate", pfUI.nameplates.UpdateNameplate)
nameplate:Show()
if visible then nameplate:Show() end
nameplate.done = true
end
end