fix(tooltip): keep learner lines out of main NPC tooltip when using secondary
Two parallel learner-tooltip systems both rendered on unit hover, so with the 'Use secondary learner tooltip' option on, learner spawn/kill lines still leaked into the main NPC tooltip instead of going solely to the secondary frame. QuestieLearner's OnTooltipSetUnit hook (toggle-aware, secondary-capable) already owns unit-hover learner display, routing it to the main tooltip (secondary off) or the separate secondary frame (secondary on). But Tooltip.lua's _GetLearnerTooltipLines also injected learner lines into the m_<npcId> tooltip data, redundantly. Add a suppressLearnerLines flag to QuestieTooltips:GetTooltip and pass it from the NPC unit-hover call in TooltipHandler so the inline lines are omitted there. Map-pin and object tooltips (no secondary frame) keep their learner lines. Also removes the latent duplicate present even with the secondary frame disabled.
This commit is contained in:
@@ -310,7 +310,10 @@ function _QuestieTooltips:AddUnitDataToTooltip()
|
||||
) then
|
||||
QuestieTooltips.lastGametooltipUnit = name
|
||||
|
||||
local tooltipData = QuestieTooltips:GetTooltip("m_" .. npcId);
|
||||
-- Suppress System A's inline learner lines here: QuestieLearner's OnTooltipSetUnit
|
||||
-- hook already renders learner spawn/kill data for the hovered unit (into the main
|
||||
-- tooltip, or the separate secondary learner frame when that option is enabled).
|
||||
local tooltipData = QuestieTooltips:GetTooltip("m_" .. npcId, true);
|
||||
|
||||
if tooltipData then
|
||||
if Questie.db.profile.enableTooltipsNPCID == true then
|
||||
|
||||
Reference in New Issue
Block a user