From 9a9ada8f8aa3231fd30838ac877ca768bd323502 Mon Sep 17 00:00:00 2001 From: Scott Sibley Date: Mon, 21 Feb 2011 09:02:15 +0000 Subject: [PATCH] Fixes ticket #19 - Tooltip flicking between two positions. --- Modules/Position/Position.lua | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/Modules/Position/Position.lua b/Modules/Position/Position.lua index c3535f3..ed1d08a 100644 --- a/Modules/Position/Position.lua +++ b/Modules/Position/Position.lua @@ -452,11 +452,18 @@ function mod:SetSpell() locked = true end lastTime = GetTime() - updateFrame:SetScript("OnUpdate", nil) - isSpell = false - isItem = false - positionTooltip() - isSpell = true + + local index = getIndex(currentOwner) + if StarTip.anchors[index]:find("^CURSOR_") then + isSpell = false + isItem = false + updateFrame:SetScript("OnUpdate", nil) + positionTooltip() + isSpell = true + else + GameTooltip:ClearAllPoints() + GameTooltip:SetPoint(StarTip.anchors[index], UIParent, StarTip.anchors[index], xoffset, yoffset) + end lastSpell = GameTooltip:GetSpell() end @@ -466,11 +473,17 @@ function mod:SetItem() locked = true end lastTime = GetTime() - updateFrame:SetScript("OnUpdate", nil) - isSpell = false - isItem = false - positionTooltip() - isItem = true + local index = getIndex(currentOwner) + if StarTip.anchors[index]:find("^CURSOR_") then + isSpell = false + isItem = false + updateFrame:SetScript("OnUpdate", nil) + positionTooltip() + isItem = true + else + GameTooltip:ClearAllPoints() + GameTooltip:SetPoint(StarTip.anchors[index], UIParent, StarTip.anchors[index], xoffset, yoffset) + end lastItem = GameTooltip:GetItem() end -- 1.7.9.5