From 57d165229272d253f6f0720d4b3bee83249d5a14 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 29 May 2017 20:01:02 +0200 Subject: [PATCH] nameplates: only show visible nameplates --- modules/nameplates.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 72e8f433..8aa83f0d 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -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