fix: memory issue on shift+drag questItemBar or trackedItemBar
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user