From 4df787419a5c2ca76b2cf238bd6f5369dcead808 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Thu, 2 Apr 2026 18:53:55 -0500 Subject: [PATCH] fix: Apply scale and alpha immediately via dedicated functions --- Modules/Arrow/QuestieArrow.lua | 17 ++++++++++++++++- .../Options/ArrowTab/QuestieOptionsArrow.lua | 8 ++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Modules/Arrow/QuestieArrow.lua b/Modules/Arrow/QuestieArrow.lua index 3ae0aa2..1e4856c 100644 --- a/Modules/Arrow/QuestieArrow.lua +++ b/Modules/Arrow/QuestieArrow.lua @@ -770,7 +770,8 @@ end function QuestieArrow:ResetPosition() Questie.db.profile.arrowPosition = nil - -- Reset to default center position + -- Ensure frame exists, then reset to default center position + EnsureArrowFrame() if arrowFrame then arrowFrame:ClearAllPoints() arrowFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -100) @@ -778,6 +779,20 @@ function QuestieArrow:ResetPosition() end end +function QuestieArrow:ApplyScale() + EnsureArrowFrame() + if arrowFrame then + arrowFrame:SetScale(_GetArrowScale()) + end +end + +function QuestieArrow:ApplyAlpha() + EnsureArrowFrame() + if arrowFrame then + arrowFrame:SetAlpha(_GetArrowAlpha()) + end +end + function QuestieArrow:Initialize() EnsureArrowFrame() diff --git a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua index ec583aa..4e02a06 100644 --- a/Modules/Options/ArrowTab/QuestieOptionsArrow.lua +++ b/Modules/Options/ArrowTab/QuestieOptionsArrow.lua @@ -56,8 +56,8 @@ function QuestieOptions.tabs.arrow:Initialize() get = function() return Questie.db.profile.arrowScale or 1 end, set = function(_, value) Questie.db.profile.arrowScale = value - if QuestieArrow and QuestieArrow.Refresh then - QuestieArrow:Refresh() + if QuestieArrow and QuestieArrow.ApplyScale then + QuestieArrow:ApplyScale() end end, }, @@ -73,8 +73,8 @@ function QuestieOptions.tabs.arrow:Initialize() get = function() return Questie.db.profile.arrowAlpha or 1.0 end, set = function(_, value) Questie.db.profile.arrowAlpha = value - if QuestieArrow and QuestieArrow.Refresh then - QuestieArrow:Refresh() + if QuestieArrow and QuestieArrow.ApplyAlpha then + QuestieArrow:ApplyAlpha() end end, },