From ebc8593b8b0027184a17e63cc6a52a839d7920e8 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 31 Oct 2009 18:30:33 +0000 Subject: [PATCH] Fix for frames getting stuck to mouse cursor --- PerfectRaid.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PerfectRaid.lua b/PerfectRaid.lua index a5cb66a..40442e6 100644 --- a/PerfectRaid.lua +++ b/PerfectRaid.lua @@ -188,6 +188,7 @@ local function OnDragStart(frame) if not PerfectRaid.db.profile.locked then parent:StartMoving() PerfectRaid.moving = parent + PerfectRaid.movingButton = frame end end @@ -196,6 +197,7 @@ local function OnDragStop(frame) parent:StopMovingOrSizing() PerfectRaid:SavePosition(parent:GetName()) PerfectRaid.moving = nil + PerfectRaid.movingButton = nil end function PerfectRaid:CreateRaidFrame(idx) @@ -448,8 +450,9 @@ local function OnShow(frame) end local function OnHide(frame) - local unit = frame:GetAttribute("unit") - frames[unit][frame] = nil + if frame == PerfectRaid.movingButton then + PerfectRaid.moving:StopMovingOrSizing() + end end function OnAttributeChanged(frame, name, value) @@ -622,6 +625,7 @@ function PerfectRaid.ConfigureButton(button) button:SetScript("OnDragStart", OnDragStart) button:SetScript("OnDragStop", OnDragStop) button:SetScript("OnAttributeChanged", OnAttributeChanged) + button:SetScript("OnHide", OnHide) end function PerfectRaid:UpdateButtonLayout(button) -- 1.7.9.5