From 7cc7987c53b48d7cab3368bd191370cfd12a26d3 Mon Sep 17 00:00:00 2001 From: Allen Faure Date: Sun, 11 Feb 2024 14:10:48 -0600 Subject: [PATCH] drop takeSnapshot arg only used by AddMany, which does its own snapshots now --- WeakAuras/AnchorToWeakAuras.lua | 2 +- WeakAuras/WeakAuras.lua | 4 ++-- WeakAurasOptions/OptionsFrames/MoverSizer.lua | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WeakAuras/AnchorToWeakAuras.lua b/WeakAuras/AnchorToWeakAuras.lua index ae249017ba..008ba91863 100644 --- a/WeakAuras/AnchorToWeakAuras.lua +++ b/WeakAuras/AnchorToWeakAuras.lua @@ -39,7 +39,7 @@ local function OnRename(_, uid, oldId, newId) local data = WeakAuras.GetData(attached) if data then data.anchorFrameFrame = "WeakAuras:" .. newId - WeakAuras.Add(data, nil, true) + WeakAuras.Add(data, true) end attachedToTarget[attached] = newId diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 87dc2a14c3..e339d2ea4c 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -3103,8 +3103,8 @@ local function pAdd(data, simpleChange) end end -function WeakAuras.Add(data, takeSnapshot, simpleChange) - if takeSnapshot or (data.internalVersion or 0) < internalVersion then +function WeakAuras.Add(data, simpleChange) + if (data.internalVersion or 0) < internalVersion then Private.SetMigrationSnapshot(data.uid, data) end local ok = xpcall(WeakAuras.PreAdd, Private.GetErrorHandlerUid(data.uid, "PreAdd"), data) diff --git a/WeakAurasOptions/OptionsFrames/MoverSizer.lua b/WeakAurasOptions/OptionsFrames/MoverSizer.lua index 89e0f56757..f0eaf53918 100644 --- a/WeakAurasOptions/OptionsFrames/MoverSizer.lua +++ b/WeakAurasOptions/OptionsFrames/MoverSizer.lua @@ -55,7 +55,7 @@ local function moveOnePxl(direction) elseif direction == "right" then data.xOffset = data.xOffset + oneX end - WeakAuras.Add(data, nil, true) + WeakAuras.Add(data, true) WeakAuras.UpdateThumbnail(data) OptionsPrivate.ResetMoverSizer() OptionsPrivate.Private.AddParents(data) @@ -1345,7 +1345,7 @@ local function ConstructMoverSizer(parent) frame:SizingSetData(data, region:GetWidth(), region:GetHeight(), 0, 0, scale) end region:ResetPosition() - WeakAuras.Add(data, nil, true) + WeakAuras.Add(data, true) frame:ScaleCorners(region:GetWidth(), region:GetHeight()) WeakAuras.FillOptions() end) @@ -1383,7 +1383,7 @@ local function ConstructMoverSizer(parent) frame:SizingSetData(data, width, height, deltaX, deltaY, scale) region:ResetPosition() - WeakAuras.Add(data, nil, true) + WeakAuras.Add(data, true) OptionsPrivate.Private.AddParents(data) WeakAuras.UpdateThumbnail(data)