fix: Arrow scale and position reset not working

This commit is contained in:
Xurkon
2026-04-02 18:25:44 -05:00
parent 67255ca5fb
commit 6a67189a4c
2 changed files with 22 additions and 4 deletions
+20 -1
View File
@@ -167,6 +167,9 @@ local function EnsureArrowFrame()
arrowFrame:SetPoint("CENTER", 0, -100)
end
-- Store whether we should use saved position or default
arrowFrame._useDefaultPosition = not (pos and pos.point)
-- Make room for the objective icon below the arrow (no overlap)
arrowFrame:SetWidth(56)
arrowFrame:SetHeight(64)
@@ -714,8 +717,13 @@ function QuestieArrow:Refresh()
EnsureArrowFrame()
local alpha = _GetArrowAlpha()
if sortedTargets[1] then
local scale = _GetArrowScale()
if arrowFrame then
arrowFrame:SetAlpha(alpha)
arrowFrame:SetScale(scale)
end
if sortedTargets[1] then
arrowFrame:Show()
else
arrowFrame:Hide()
@@ -757,6 +765,17 @@ function QuestieArrow:ClearTarget()
end
end
function QuestieArrow:ResetPosition()
Questie.db.profile.arrowPosition = nil
-- Destroy and recreate the arrow frame to apply default position
if arrowFrame then
arrowFrame:Hide()
arrowFrame:ClearAllPoints()
arrowFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -100)
arrowFrame:Show()
end
end
function QuestieArrow:Initialize()
EnsureArrowFrame()
@@ -104,9 +104,8 @@ function QuestieOptions.tabs.arrow:Initialize()
name = function() return l10n("Reset Arrow Position") end,
desc = function() return l10n("Reset the arrow position to the center of the screen") end,
func = function()
Questie.db.profile.arrowPosition = nil
if QuestieArrow and QuestieArrow.Refresh then
QuestieArrow:Refresh()
if QuestieArrow and QuestieArrow.ResetPosition then
QuestieArrow:ResetPosition()
end
end,
},