Skip to content

Commit

Permalink
Use new staticId api from Masque
Browse files Browse the repository at this point in the history
  • Loading branch information
InfusOnWoW committed Mar 10, 2019
1 parent 28fc160 commit 85bfb2a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions WeakAuras/RegionTypes/Icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,13 @@ local function modify(parent, region, data)

if MSQ then
local masqueId = data.id:lower():gsub(" ", "_");
-- TODO -- This should check if the masque id is different instead of always keeping the same masqueId
-- But currently masque behaves strangely when a button was already part of a group and the new group is disabled
-- In that case the button gets a Blizzard skin
if not region.masqueId then
local staticId = data.uid
if region.masqueId ~= masqueId then
region.masqueId = masqueId
region.MSQGroup = MSQ:Group("WeakAuras", region.masqueId);
region.MSQGroup = MSQ:Group("WeakAuras", region.masqueId, nil, staticId);
if staticId then
region.MSQGroup:SetName(data.id)
end
region.MSQGroup:AddButton(button, {Icon = icon, Cooldown = cooldown});

button.data = data
Expand Down

0 comments on commit 85bfb2a

Please sign in to comment.