From b7b6280e9d8be04e4563ab35ac40d5d458112c42 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Mon, 1 Jun 2026 18:03:01 -0500 Subject: [PATCH] debug(framepool): add gated [QD] trace for FakeHide/FakeShow Adds a print() block in _Qframe:FakeHide and _Qframe:FakeShow, gated by _G.QuestieDebugPins. Dumps frame name, shown/hidden state, parent, and anchor point. Used to diagnose why minimap pins reappear or fail to hide after zone transitions or anchor re-registration. Default state: GATE IS OFF. The block is a no-op unless the user explicitly sets _G.QuestieDebugPins = true. Zero runtime cost in production. All API calls defensive with tostring() and parent.GetName fallbacks. --- Modules/FramePool/QuestieFrame.lua | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Modules/FramePool/QuestieFrame.lua b/Modules/FramePool/QuestieFrame.lua index 45d3e74..8d5f387 100644 --- a/Modules/FramePool/QuestieFrame.lua +++ b/Modules/FramePool/QuestieFrame.lua @@ -438,6 +438,23 @@ end --- This is needed because HBD will show the icons again after switching zones and stuff like that function _Qframe:FakeHide() if not self.hidden then + if _G.QuestieDebugPins and self.miniMapIcon then + local parent = self:GetParent() + local point1, rel1, point2, xOff, yOff = self:GetPoint() + print(string.format( + "[QD] FakeHide name=%s shown=%s hidden=%s should=%s parent=%s point=(%s,%s,%s,%s,%s)", + tostring(self:GetName()), + tostring(self:IsShown()), + tostring(self.hidden), + tostring(self.shouldBeShowing), + tostring(parent and parent.GetName and parent:GetName() or parent), + tostring(point1), + tostring(rel1 and rel1.GetName and rel1:GetName() or rel1), + tostring(point2), + tostring(xOff), + tostring(yOff) + )) + end self.shouldBeShowing = self:IsShown(); self._show = self.Show; self.Show = function() @@ -460,6 +477,23 @@ end --- This is needed because HBD will show the icons again after switching zones and stuff like that function _Qframe:FakeShow() if self.hidden then + if _G.QuestieDebugPins and self.miniMapIcon then + local parent = self:GetParent() + local point1, rel1, point2, xOff, yOff = self:GetPoint() + print(string.format( + "[QD] FakeShow name=%s shown=%s hidden=%s should=%s parent=%s point=(%s,%s,%s,%s,%s)", + tostring(self:GetName()), + tostring(self:IsShown()), + tostring(self.hidden), + tostring(self.shouldBeShowing), + tostring(parent and parent.GetName and parent:GetName() or parent), + tostring(point1), + tostring(rel1 and rel1.GetName and rel1:GetName() or rel1), + tostring(point2), + tostring(xOff), + tostring(yOff) + )) + end self.hidden = false self.Show = self._show; self.Hide = self._hide;