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
@@ -2,7 +2,7 @@
## Title: Guda
## Notes: All-in-one bag and bank addon for Turtle WoW
## Author: Vati
## Version: 1.5.2
## Version: 1.5.3
## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB
+1 -1
View File
@@ -1475,7 +1475,7 @@ function SortEngine:ExecuteSort(sortFunction, analyzeFunction, updateFrame, sort
sortType, passCount, moveCount, currentAnalysis.itemsOutOfPlace, currentAnalysis.totalItems, remainingRatio * 100)
-- PROGRESSIVE DELAY: Calculate delay based on remaining complexity
local baseDelay = 1.2
local baseDelay = 0.9
local complexityDelay = math.min(currentAnalysis.itemsOutOfPlace * 0.06, 2.5) -- max 2.5 seconds
local totalDelay = baseDelay + complexityDelay
+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()