From ec3147c234f80e95468efe169142f26a67675c9a Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sat, 27 Aug 2016 11:26:35 +0300 Subject: [PATCH] Fix role icons rseting to default --- ElvUI_SLE/modules/unitframes/roleIcons.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ElvUI_SLE/modules/unitframes/roleIcons.lua b/ElvUI_SLE/modules/unitframes/roleIcons.lua index 9c6c6c6..f231ad2 100644 --- a/ElvUI_SLE/modules/unitframes/roleIcons.lua +++ b/ElvUI_SLE/modules/unitframes/roleIcons.lua @@ -61,8 +61,11 @@ function SUF:SetRoleIcons() local group = T.select(i, header:GetChildren()) for j = 1, group:GetNumChildren() do local unitbutton = T.select(j, group:GetChildren()) - if unitbutton.LFDRole and unitbutton.LFDRole.Override then + if unitbutton.LFDRole and unitbutton.LFDRole.Override and not unitbutton.LFDRole.sleRoleSetup then unitbutton.LFDRole.Override = SUF.UpdateRoleIcon + unitbutton:UnregisterEvent("UNIT_CONNECTION") + unitbutton:RegisterEvent("UNIT_CONNECTION", SUF.UpdateRoleIcon) + unitbutton.LFDRole.sleRoleSetup = true end end end -- 1.7.9.5