from retail
This commit is contained in:
@@ -1563,11 +1563,11 @@ function GenericTrigger.Add(data, region)
|
|||||||
else
|
else
|
||||||
tinsert(trigger_events, event)
|
tinsert(trigger_events, event)
|
||||||
end
|
end
|
||||||
if trigger.custom_type == "status" or trigger.custom_type == "stateupdate" then
|
|
||||||
force_events = data.information.forceEvents or "STATUS"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if trigger.custom_type == "status" or trigger.custom_type == "stateupdate" then
|
||||||
|
force_events = data.information.forceEvents or "STATUS"
|
||||||
|
end
|
||||||
if (trigger.custom_type == "stateupdate") then
|
if (trigger.custom_type == "stateupdate") then
|
||||||
statesParameter = "full";
|
statesParameter = "full";
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ local funcs = {
|
|||||||
orientVertical(self);
|
orientVertical(self);
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
UpdateEffectiveOrientation = function(self)
|
UpdateEffectiveOrientation = function(self, force)
|
||||||
local orientation = self.orientation
|
local orientation = self.orientation
|
||||||
|
|
||||||
if self.flipX then
|
if self.flipX then
|
||||||
@@ -979,7 +979,7 @@ local funcs = {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if orientation ~= self.effectiveOrientation then
|
if orientation ~= self.effectiveOrientation or force then
|
||||||
self.effectiveOrientation = orientation
|
self.effectiveOrientation = orientation
|
||||||
self:ReOrient()
|
self:ReOrient()
|
||||||
end
|
end
|
||||||
@@ -1339,7 +1339,7 @@ local function modify(parent, region, data)
|
|||||||
self:SetHeight(self.bar.totalHeight);
|
self:SetHeight(self.bar.totalHeight);
|
||||||
icon:SetHeight(self.bar.iconHeight);
|
icon:SetHeight(self.bar.iconHeight);
|
||||||
|
|
||||||
region:UpdateEffectiveOrientation()
|
region:UpdateEffectiveOrientation(true)
|
||||||
end
|
end
|
||||||
-- region:Scale(1.0, 1.0);
|
-- region:Scale(1.0, 1.0);
|
||||||
if data.smoothProgress then
|
if data.smoothProgress then
|
||||||
|
|||||||
@@ -1335,12 +1335,15 @@ local function modify(parent, region, data)
|
|||||||
self.currentWidth = width
|
self.currentWidth = width
|
||||||
self.currentHeight = height
|
self.currentHeight = height
|
||||||
|
|
||||||
local regionLeft = region:GetLeft()
|
if data.border and not data.useAnchorPerUnit then
|
||||||
local regionBottom = region:GetBottom()
|
local regionLeft = SafeGetPos(region, region.GetLeft) or minX
|
||||||
self.background:SetPoint("BOTTOMLEFT", region, "BOTTOMLEFT", minX + -1 * data.borderOffset - regionLeft,
|
local regionBottom = SafeGetPos(region, region.GetBottom) or minY
|
||||||
minY + -1 * data.borderOffset - regionBottom)
|
if regionLeft and regionBottom then
|
||||||
self.background:SetPoint("TOPRIGHT", region, "BOTTOMLEFT", maxX + data.borderOffset - regionLeft,
|
self.background:ClearAllPoints()
|
||||||
maxY + data.borderOffset - regionBottom)
|
self.background:SetPoint("BOTTOMLEFT", region, "BOTTOMLEFT", minX + -1 * data.borderOffset - regionLeft, minY + -1 * data.borderOffset - regionBottom)
|
||||||
|
self.background:SetPoint("TOPRIGHT", region, "BOTTOMLEFT", maxX + data.borderOffset - regionLeft, maxY + data.borderOffset - regionBottom)
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:Hide()
|
self:Hide()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ do
|
|||||||
Private.StartProfileSystem("model");
|
Private.StartProfileSystem("model");
|
||||||
for id, data in pairs(Private.regions) do
|
for id, data in pairs(Private.regions) do
|
||||||
Private.StartProfileAura(id);
|
Private.StartProfileAura(id);
|
||||||
if data.region.toShow then
|
if data.region and data.region.toShow then
|
||||||
if (data.regionType == "model") then
|
if (data.regionType == "model") then
|
||||||
data.region:PreShow();
|
data.region:PreShow();
|
||||||
end
|
end
|
||||||
|
|||||||
+28
-18
@@ -1114,7 +1114,7 @@ function Private.Login(initialTime, takeNewSnapshots)
|
|||||||
loginFinished = true
|
loginFinished = true
|
||||||
-- Tell Dynamic Groups that we are done with login
|
-- Tell Dynamic Groups that we are done with login
|
||||||
for _, region in pairs(Private.regions) do
|
for _, region in pairs(Private.regions) do
|
||||||
if (region.region.RunDelayedActions) then
|
if (region.region and region.region.RunDelayedActions) then
|
||||||
region.region:RunDelayedActions();
|
region.region:RunDelayedActions();
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1281,7 +1281,7 @@ end
|
|||||||
function Private.PauseAllDynamicGroups()
|
function Private.PauseAllDynamicGroups()
|
||||||
local suspended = {}
|
local suspended = {}
|
||||||
for id, region in pairs(Private.regions) do
|
for id, region in pairs(Private.regions) do
|
||||||
if (region.region.Suspend) then
|
if (region.region and region.region.Suspend) then
|
||||||
region.region:Suspend();
|
region.region:Suspend();
|
||||||
tinsert(suspended, id)
|
tinsert(suspended, id)
|
||||||
end
|
end
|
||||||
@@ -1587,7 +1587,9 @@ function Private.Resume()
|
|||||||
local suspended = Private.PauseAllDynamicGroups()
|
local suspended = Private.PauseAllDynamicGroups()
|
||||||
|
|
||||||
for id, region in pairs(Private.regions) do
|
for id, region in pairs(Private.regions) do
|
||||||
region.region:Collapse();
|
if region.region then
|
||||||
|
region.region:Collapse();
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for id, cloneList in pairs(clones) do
|
for id, cloneList in pairs(clones) do
|
||||||
@@ -1723,7 +1725,7 @@ function WeakAuras.Delete(data)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Private.regions[id] then
|
if Private.regions[id] and Private.regions[id].region then
|
||||||
Private.regions[id].region:Collapse()
|
Private.regions[id].region:Collapse()
|
||||||
Private.CancelAnimation(Private.regions[id].region, true, true, true, true, true, true)
|
Private.CancelAnimation(Private.regions[id].region, true, true, true, true, true, true)
|
||||||
|
|
||||||
@@ -1804,7 +1806,7 @@ function WeakAuras.Rename(data, newid)
|
|||||||
UIDtoID[data.uid] = newid
|
UIDtoID[data.uid] = newid
|
||||||
Private.regions[newid] = Private.regions[oldid];
|
Private.regions[newid] = Private.regions[oldid];
|
||||||
Private.regions[oldid] = nil;
|
Private.regions[oldid] = nil;
|
||||||
if Private.regions[newid] then
|
if Private.regions[newid] and Private.regions[newid].region then
|
||||||
Private.regions[newid].region.id = newid
|
Private.regions[newid].region.id = newid
|
||||||
end
|
end
|
||||||
if(clones[oldid]) then
|
if(clones[oldid]) then
|
||||||
@@ -2238,7 +2240,7 @@ function Private.AddMany(tbl, takeSnapshots)
|
|||||||
|
|
||||||
for data in pairs(groups) do
|
for data in pairs(groups) do
|
||||||
if data.type == "dynamicgroup" then
|
if data.type == "dynamicgroup" then
|
||||||
if Private.regions[data.id] then
|
if Private.regions[data.id] and Private.regions[data.id].region then
|
||||||
Private.regions[data.id].region:ReloadControlledChildren()
|
Private.regions[data.id].region:ReloadControlledChildren()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -3206,7 +3208,7 @@ function Private.HandleGlowAction(actions, region)
|
|||||||
if WeakAuras.GetData(frame_name) then
|
if WeakAuras.GetData(frame_name) then
|
||||||
Private.EnsureRegion(frame_name)
|
Private.EnsureRegion(frame_name)
|
||||||
end
|
end
|
||||||
if Private.regions[frame_name] then
|
if Private.regions[frame_name] and Private.regions[frame_name].region then
|
||||||
glow_frame = Private.regions[frame_name].region
|
glow_frame = Private.regions[frame_name].region
|
||||||
should_glow_frame = true
|
should_glow_frame = true
|
||||||
end
|
end
|
||||||
@@ -3596,12 +3598,14 @@ local DisplayTimes = {};
|
|||||||
function WeakAuras.ProfileDisplays(all)
|
function WeakAuras.ProfileDisplays(all)
|
||||||
UpdateAddOnCPUUsage();
|
UpdateAddOnCPUUsage();
|
||||||
for id, regionData in pairs(Private.regions) do
|
for id, regionData in pairs(Private.regions) do
|
||||||
local DisplayTime = GetFrameCPUUsage(regionData.region, true);
|
if regionData.region then
|
||||||
DisplayTimes[id] = DisplayTimes[id] or 0;
|
local DisplayTime = GetFrameCPUUsage(regionData.region, true);
|
||||||
if(all or DisplayTime > DisplayTimes[id]) then
|
DisplayTimes[id] = DisplayTimes[id] or 0;
|
||||||
print("|cFFFF0000"..id.."|r -", DisplayTime, "-", DisplayTime - DisplayTimes[id]);
|
if(all or DisplayTime > DisplayTimes[id]) then
|
||||||
|
print("|cFFFF0000"..id.."|r -", DisplayTime, "-", DisplayTime - DisplayTimes[id]);
|
||||||
|
end
|
||||||
|
DisplayTimes[id] = DisplayTime;
|
||||||
end
|
end
|
||||||
DisplayTimes[id] = DisplayTime;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -4161,7 +4165,7 @@ function Private.UpdatedTriggerState(id)
|
|||||||
for _, clone in pairs(clones[id]) do
|
for _, clone in pairs(clones[id]) do
|
||||||
clone:Collapse()
|
clone:Collapse()
|
||||||
end
|
end
|
||||||
if Private.regions[id] then
|
if Private.regions[id] and Private.regions[id].region then
|
||||||
Private.regions[id].region:Collapse()
|
Private.regions[id].region:Collapse()
|
||||||
end
|
end
|
||||||
elseif (show and oldShow) then -- Already shown, update regions
|
elseif (show and oldShow) then -- Already shown, update regions
|
||||||
@@ -4172,7 +4176,7 @@ function Private.UpdatedTriggerState(id)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (not activeTriggerState[""] or not activeTriggerState[""].show) then
|
if (not activeTriggerState[""] or not activeTriggerState[""].show) then
|
||||||
if Private.regions[id] then
|
if Private.regions[id] and Private.regions[id].region then
|
||||||
Private.regions[id].region:Collapse()
|
Private.regions[id].region:Collapse()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -4938,10 +4942,16 @@ local function tryAnchorAgain()
|
|||||||
local region = WeakAuras.GetRegion(id);
|
local region = WeakAuras.GetRegion(id);
|
||||||
if (data and region) then
|
if (data and region) then
|
||||||
local parent = WeakAurasFrame;
|
local parent = WeakAurasFrame;
|
||||||
if (data.parent and WeakAuras.GetData(data.parent) and Private.EnsureRegion(data.parent)) then
|
local parentData
|
||||||
parent = Private.regions[data.parent].region;
|
if data.parent then
|
||||||
|
parentData = WeakAuras.GetData(data.parent)
|
||||||
|
if parentData and Private.EnsureRegion(data.parent) then
|
||||||
|
parent = Private.regions[data.parent].region
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not parentData or parentData.regionType ~= "dynamicgroup" then
|
||||||
|
Private.AnchorFrame(data, region, parent)
|
||||||
end
|
end
|
||||||
Private.AnchorFrame(data, region, parent);
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -5027,7 +5037,7 @@ local function GetAnchorFrame(data, region, parent)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(Private.regions[frame_name]) then
|
if Private.regions[frame_name] and Private.regions[frame_name].region then
|
||||||
return Private.regions[frame_name].region;
|
return Private.regions[frame_name].region;
|
||||||
end
|
end
|
||||||
postponeAnchor(id);
|
postponeAnchor(id);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ local methods = {
|
|||||||
self.texture:SetTexture(texturePath);
|
self.texture:SetTexture(texturePath);
|
||||||
self.texture.path = texturePath;
|
self.texture.path = texturePath;
|
||||||
self.texture.name = name;
|
self.texture.name = name;
|
||||||
|
self.texture:SetSize(120, 120);
|
||||||
end,
|
end,
|
||||||
["ChangeTexture"] = function(self, r, g, b, a, rotate, discrete_rotation, rotation, mirror, blendMode)
|
["ChangeTexture"] = function(self, r, g, b, a, rotate, discrete_rotation, rotation, mirror, blendMode)
|
||||||
local ulx,uly , llx,lly , urx,ury , lrx,lry;
|
local ulx,uly , llx,lly , urx,ury , lrx,lry;
|
||||||
@@ -107,8 +108,8 @@ local function Constructor()
|
|||||||
button:SetHighlightTexture(highlighttexture);
|
button:SetHighlightTexture(highlighttexture);
|
||||||
|
|
||||||
local texture = button:CreateTexture(nil, "OVERLAY");
|
local texture = button:CreateTexture(nil, "OVERLAY");
|
||||||
texture:SetPoint("BOTTOMLEFT", button, 4, 4);
|
texture:SetPoint("CENTER")
|
||||||
texture:SetPoint("TOPRIGHT", button, -4, -4);
|
texture:SetSize(120, 120)
|
||||||
|
|
||||||
button:SetScript("OnEnter", function() Show_Tooltip(button, texture.name, texture.path:gsub("\\", "\n")) end);
|
button:SetScript("OnEnter", function() Show_Tooltip(button, texture.name, texture.path:gsub("\\", "\n")) end);
|
||||||
button:SetScript("OnLeave", Hide_Tooltip);
|
button:SetScript("OnLeave", Hide_Tooltip);
|
||||||
|
|||||||
@@ -313,13 +313,20 @@ function OptionsPrivate.GetInformationOptions(data)
|
|||||||
local sameDebugLog = true
|
local sameDebugLog = true
|
||||||
local commonDebugLog
|
local commonDebugLog
|
||||||
local debugLogDesc = ""
|
local debugLogDesc = ""
|
||||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
|
||||||
local effectiveDebugLog = child.information.debugLog and true or false
|
if isGroup and not isTmpGroup then
|
||||||
debugLogDesc = debugLogDesc .. "|cFFE0E000"..child.id..": |r".. (effectiveDebugLog and "true" or "false") .. "\n"
|
sameDebugLog = true
|
||||||
if commonDebugLog == nil then
|
commonDebugLog = data.information.debugLog and true or false
|
||||||
commonDebugLog = effectiveDebugLog
|
else
|
||||||
elseif effectiveDebugLog ~= commonDebugLog then
|
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||||
sameDebugLog = false
|
--- @type boolean
|
||||||
|
local effectiveDebugLog = child.information.debugLog and true or false
|
||||||
|
debugLogDesc = debugLogDesc .. "|cFFE0E000"..child.id..": |r".. (effectiveDebugLog and "true" or "false") .. "\n"
|
||||||
|
if commonDebugLog == nil then
|
||||||
|
commonDebugLog = effectiveDebugLog
|
||||||
|
elseif effectiveDebugLog ~= commonDebugLog then
|
||||||
|
sameDebugLog = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
args.debugLogToggle = {
|
args.debugLogToggle = {
|
||||||
@@ -332,10 +339,15 @@ function OptionsPrivate.GetInformationOptions(data)
|
|||||||
return sameDebugLog and commonDebugLog
|
return sameDebugLog and commonDebugLog
|
||||||
end,
|
end,
|
||||||
set = function(info, v)
|
set = function(info, v)
|
||||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
if isGroup and not isTmpGroup then
|
||||||
child.information.debugLog = v
|
data.information.debugLog = v
|
||||||
WeakAuras.Add(child)
|
WeakAuras.Add(data)
|
||||||
OptionsPrivate.ClearOptions(child.id)
|
else
|
||||||
|
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||||
|
child.information.debugLog = v
|
||||||
|
WeakAuras.Add(child)
|
||||||
|
OptionsPrivate.ClearOptions(child.id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||||
end
|
end
|
||||||
@@ -350,18 +362,32 @@ function OptionsPrivate.GetInformationOptions(data)
|
|||||||
func = function()
|
func = function()
|
||||||
local fullMessage = L["WeakAuras %s on WoW %s"]:format(WeakAuras.versionString, WeakAuras.BuildInfo) .. "\n\n"
|
local fullMessage = L["WeakAuras %s on WoW %s"]:format(WeakAuras.versionString, WeakAuras.BuildInfo) .. "\n\n"
|
||||||
local haveLogs = false
|
local haveLogs = false
|
||||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
if isGroup and not isTmpGroup then
|
||||||
local auraLog = OptionsPrivate.Private.DebugLog.GetLogs(child.uid)
|
local auraLog = OptionsPrivate.Private.DebugLog.GetLogs(data.uid)
|
||||||
if auraLog then
|
if auraLog then
|
||||||
haveLogs = true
|
haveLogs = true
|
||||||
fullMessage = fullMessage .. L["Aura: '%s'"]:format(child.id)
|
fullMessage = fullMessage .. L["Aura: '%s'"]:format(data.id)
|
||||||
local version = child.semver or child.version
|
local version = data.semver or data.version
|
||||||
if (version) then
|
if (version) then
|
||||||
fullMessage = fullMessage .. "\n" .. L["Version: %s"]:format(version)
|
fullMessage = fullMessage .. "\n" .. L["Version: %s"]:format(version)
|
||||||
end
|
end
|
||||||
fullMessage = fullMessage .. "\n" .. L["Debug Log:"] .. "\n" .. auraLog .. "\n\n"
|
fullMessage = fullMessage .. "\n" .. L["Debug Log:"] .. "\n" .. auraLog .. "\n\n"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||||
|
local auraLog = OptionsPrivate.Private.DebugLog.GetLogs(child.uid)
|
||||||
|
if auraLog then
|
||||||
|
haveLogs = true
|
||||||
|
fullMessage = fullMessage .. L["Aura: '%s'"]:format(child.id)
|
||||||
|
local version = child.semver or child.version
|
||||||
|
if (version) then
|
||||||
|
fullMessage = fullMessage .. "\n" .. L["Version: %s"]:format(version)
|
||||||
|
end
|
||||||
|
fullMessage = fullMessage .. "\n" .. L["Debug Log:"] .. "\n" .. auraLog .. "\n\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if haveLogs then
|
if haveLogs then
|
||||||
OptionsPrivate.OpenDebugLog(fullMessage)
|
OptionsPrivate.OpenDebugLog(fullMessage)
|
||||||
else
|
else
|
||||||
@@ -376,8 +402,12 @@ function OptionsPrivate.GetInformationOptions(data)
|
|||||||
width = WeakAuras.normalWidth,
|
width = WeakAuras.normalWidth,
|
||||||
order = order,
|
order = order,
|
||||||
func = function()
|
func = function()
|
||||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
if isGroup and not isTmpGroup then
|
||||||
OptionsPrivate.Private.DebugLog.Clear(child.uid)
|
OptionsPrivate.Private.DebugLog.Clear(data.uid)
|
||||||
|
else
|
||||||
|
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
|
||||||
|
OptionsPrivate.Private.DebugLog.Clear(child.uid)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ function OptionsPrivate.StartFrameChooser(data, path)
|
|||||||
focusName = nil;
|
focusName = nil;
|
||||||
local focusIsGroup = false;
|
local focusIsGroup = false;
|
||||||
for id, regionData in pairs(OptionsPrivate.Private.regions) do
|
for id, regionData in pairs(OptionsPrivate.Private.regions) do
|
||||||
if(regionData.region:IsVisible() and MouseIsOver(regionData.region)) then
|
if(regionData.region and regionData.region:IsVisible() and MouseIsOver(regionData.region)) then
|
||||||
local isGroup = regionData.regionType == "group" or regionData.regionType == "dynamicgroup";
|
local isGroup = regionData.regionType == "group" or regionData.regionType == "dynamicgroup";
|
||||||
if (not focusName or (not isGroup and focusIsGroup)) then
|
if (not focusName or (not isGroup and focusIsGroup)) then
|
||||||
focus = regionData.region;
|
focus = regionData.region;
|
||||||
|
|||||||
@@ -634,7 +634,7 @@ local function ConstructMoverSizer(parent)
|
|||||||
data.yOffset = dY / scale
|
data.yOffset = dY / scale
|
||||||
end
|
end
|
||||||
region:ResetPosition()
|
region:ResetPosition()
|
||||||
WeakAuras.Add(data, nil, true)
|
WeakAuras.Add(data)
|
||||||
WeakAuras.UpdateThumbnail(data)
|
WeakAuras.UpdateThumbnail(data)
|
||||||
local xOff, yOff
|
local xOff, yOff
|
||||||
mover.selfPoint, mover.anchor, mover.anchorPoint, xOff, yOff = region:GetPoint(1)
|
mover.selfPoint, mover.anchor, mover.anchorPoint, xOff, yOff = region:GetPoint(1)
|
||||||
|
|||||||
@@ -138,12 +138,14 @@ function OptionsPrivate.CreateFrame()
|
|||||||
|
|
||||||
|
|
||||||
for id, data in pairs(OptionsPrivate.Private.regions) do
|
for id, data in pairs(OptionsPrivate.Private.regions) do
|
||||||
data.region:Collapse()
|
if data.region then
|
||||||
data.region:OptionsClosed()
|
data.region:Collapse()
|
||||||
if OptionsPrivate.Private.clones[id] then
|
data.region:OptionsClosed()
|
||||||
for _, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do
|
if OptionsPrivate.Private.clones[id] then
|
||||||
cloneRegion:Collapse()
|
for _, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do
|
||||||
cloneRegion:OptionsClosed()
|
cloneRegion:Collapse()
|
||||||
|
cloneRegion:OptionsClosed()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -182,15 +182,15 @@ local function recurseUpdate(data, chunk)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local ignoredForDiffChecking -- Needs to be created lazily
|
local function RecurseDiff(ours, theirs, ignoredForDiffChecking)
|
||||||
local function RecurseDiff(ours, theirs)
|
|
||||||
local diff, seen, same = {}, {}, true
|
local diff, seen, same = {}, {}, true
|
||||||
for key, ourVal in pairs(ours) do
|
for key, ourVal in pairs(ours) do
|
||||||
if not ignoredForDiffChecking[key] then
|
if type(ignoredForDiffChecking) ~= table or ignoredForDiffChecking[key] ~= true then
|
||||||
seen[key] = true
|
seen[key] = true
|
||||||
local theirVal = theirs[key]
|
local theirVal = theirs[key]
|
||||||
if type(ourVal) == "table" and type(theirVal) == "table" then
|
if type(ourVal) == "table" and type(theirVal) == "table" then
|
||||||
local diffVal = RecurseDiff(ourVal, theirVal)
|
local diffVal = RecurseDiff(ourVal, theirVal,
|
||||||
|
type(ignoredForDiffChecking) == table and ignoredForDiffChecking[key] or nil)
|
||||||
if diffVal then
|
if diffVal then
|
||||||
diff[key] = diffVal
|
diff[key] = diffVal
|
||||||
same = false
|
same = false
|
||||||
@@ -207,7 +207,7 @@ local function RecurseDiff(ours, theirs)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for key, theirVal in pairs(theirs) do
|
for key, theirVal in pairs(theirs) do
|
||||||
if not seen[key] and not ignoredForDiffChecking[key] then
|
if not seen[key] and (type(ignoredForDiffChecking) ~= table or ignoredForDiffChecking[key] ~= true) then
|
||||||
diff[key] = theirVal
|
diff[key] = theirVal
|
||||||
same = false
|
same = false
|
||||||
end
|
end
|
||||||
@@ -243,15 +243,13 @@ local function DebugPrintDiff(diff)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function Diff(ours, theirs)
|
local function Diff(ours, theirs)
|
||||||
if not ignoredForDiffChecking then
|
local ignoredForDiffChecking = WeakAuras.Mixin({}, OptionsPrivate.Private.internal_fields,
|
||||||
ignoredForDiffChecking = WeakAuras.Mixin({}, OptionsPrivate.Private.internal_fields,
|
OptionsPrivate.Private.non_transmissable_fields)
|
||||||
OptionsPrivate.Private.non_transmissable_fields)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- generates a diff which WeakAuras.Update can use
|
-- generates a diff which WeakAuras.Update can use
|
||||||
local debug = false
|
local debug = false
|
||||||
if not ours or not theirs then return end
|
if not ours or not theirs then return end
|
||||||
local diff = RecurseDiff(ours, theirs)
|
local diff = RecurseDiff(ours, theirs, ignoredForDiffChecking)
|
||||||
if diff then
|
if diff then
|
||||||
if debug then
|
if debug then
|
||||||
DebugPrintDiff(diff, ours.id, theirs.id)
|
DebugPrintDiff(diff, ours.id, theirs.id)
|
||||||
|
|||||||
@@ -906,7 +906,7 @@ function OptionsPrivate.ConvertDisplay(data, newType)
|
|||||||
local visibility = displayButtons[id]:GetVisibility();
|
local visibility = displayButtons[id]:GetVisibility();
|
||||||
displayButtons[id]:PriorityHide(2);
|
displayButtons[id]:PriorityHide(2);
|
||||||
|
|
||||||
if OptionsPrivate.Private.regions[id] then
|
if OptionsPrivate.Private.regions[id] and OptionsPrivate.Private.regions[id].region then
|
||||||
OptionsPrivate.Private.regions[id].region:Collapse()
|
OptionsPrivate.Private.regions[id].region:Collapse()
|
||||||
end
|
end
|
||||||
OptionsPrivate.Private.CollapseAllClones(id);
|
OptionsPrivate.Private.CollapseAllClones(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user