fix: memory issue on shift+drag questItemBar or trackedItemBar

This commit is contained in:
Salikh Gurgenidze
2025-12-29 23:27:53 +04:00
parent 4004383d41
commit b5c9d6b829
4 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ function QuestItemBar:Update()
button:SetScript("OnReceiveDrag", function() end)
button:SetScript("OnMouseDown", function()
if arg1 == "LeftButton" then
if IsShiftKeyDown() then
if IsShiftKeyDown() and not (CursorHasItem and CursorHasItem()) then
this:GetParent():StartMoving()
this:GetParent().isMoving = true
end
+5 -3
View File
@@ -95,7 +95,7 @@ function TrackedItemBar:Update()
button:SetScript("OnReceiveDrag", function() end)
button:SetScript("OnMouseDown", function()
if arg1 == "LeftButton" then
if IsShiftKeyDown() then
if IsShiftKeyDown() and not (CursorHasItem and CursorHasItem()) then
this:GetParent():StartMoving()
this:GetParent().isMoving = true
end
@@ -190,8 +190,10 @@ function TrackedItemBar:Initialize()
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnMouseDown", function()
if arg1 == "LeftButton" then
this:StartMoving()
this.isMoving = true
if IsShiftKeyDown() and not (CursorHasItem and CursorHasItem()) then
this:StartMoving()
this.isMoving = true
end
end
end)
frame:SetScript("OnMouseUp", function()