diff --git a/Modules/Arrow/QuestieArrow.lua b/Modules/Arrow/QuestieArrow.lua index bc4d5ff..40021a5 100644 --- a/Modules/Arrow/QuestieArrow.lua +++ b/Modules/Arrow/QuestieArrow.lua @@ -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() diff --git a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua index 562228f..ec583aa 100644 --- a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua +++ b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua @@ -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, },