From 62956abb8ee208a460af98d6691837cecc43a58c Mon Sep 17 00:00:00 2001 From: Narcasung Date: Wed, 15 Jul 2026 13:42:34 +0200 Subject: [PATCH] fix(map): keep world-map icons inside Magnify's native scroll clip SetDrawOrder only recognized a standalone "Magnify-WotLK" addon, but this setup bundles Magnify inside LootCollector (no separate .toc), so the check always failed and every icon got reparented onto WorldMapFrame -- outside WorldMapScrollFrame's clipped subtree -- and strata-forced to WorldMapFrame instead of WorldMapButton, regardless of HBD's earlier correct parenting. Detect the bundled Magnify via the _G.LootCollectorMagnify global and match WorldMapButton's strata instead, mirroring LootCollector's own pins. Fixes icon culling on all 4 edges during both zoom and pan, in normal and objective-panel map modes. --- Modules/Map/QuestieMapUtils.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Modules/Map/QuestieMapUtils.lua b/Modules/Map/QuestieMapUtils.lua index a16cb1b..471d84c 100644 --- a/Modules/Map/QuestieMapUtils.lua +++ b/Modules/Map/QuestieMapUtils.lua @@ -47,13 +47,20 @@ function QuestieMap.utils:SetDrawOrder(frame) frame:SetFrameStrata(frameStrata) frame:SetFrameLevel(frameLevel) else - -- If Magnify-WotLK is loaded, parent to WorldMapButton instead of WorldMapFrame + -- If Magnify is loaded (standalone Magnify-WotLK, or bundled inside LootCollector, + -- which has no separate .toc so IsAddOnLoaded("Magnify-WotLK") never sees it), + -- parent to WorldMapButton and match ITS strata instead of WorldMapFrame's, so the + -- icon stays inside Magnify's native WorldMapScrollFrame clip subtree (mirrors how + -- LootCollector's own map pins are parented/strata'd in Modules/Map.lua) + local magnifyLoaded = (IsAddOnLoaded and IsAddOnLoaded("Magnify-WotLK")) or (_G.LootCollectorMagnify ~= nil) local parent = WorldMapFrame - if IsAddOnLoaded and IsAddOnLoaded("Magnify-WotLK") and _G.WorldMapButton then + local strataSource = WorldMapFrame + if magnifyLoaded and _G.WorldMapButton then parent = WorldMapButton + strataSource = WorldMapButton end local frameLevel = WorldMapFrame:GetFrameLevel() + 7 - local frameStrata = WorldMapFrame:GetFrameStrata() + local frameStrata = strataSource:GetFrameStrata() frame:SetParent(parent) frame:SetFrameStrata(frameStrata) frame:SetFrameLevel(frameLevel)