Skip to content

Commit

Permalink
drop takeSnapshot arg
Browse files Browse the repository at this point in the history
only used by AddMany, which does its own snapshots now
  • Loading branch information
emptyrivers authored and InfusOnWoW committed Feb 11, 2024
1 parent a6a2aef commit 7cc7987
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion WeakAuras/AnchorToWeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions WeakAurasOptions/OptionsFrames/MoverSizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 7cc7987

Please sign in to comment.