Skip to content

Commit 47daa49

Browse files
committed
fix: extraneous error thrown when reordering groups
1 parent ef1d864 commit 47daa49

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Options/GroupConfig.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,15 @@ TMW:NewClass("Config_GroupListButton", "Config_CheckButton"){
333333
local groupSelect = self:CScriptBubbleGet("GetGroupListContainer")
334334

335335
local group, domain, ID = groupSelect:GetDraggingGroup()
336-
groupSelect:SetDraggingGroup(nil, nil, nil)
336+
337+
-- Only process if we actually have a group (prevents multiple OnDragStop calls)
338+
-- As of some recent WoW patch (11.0? 11.0.5? 11.0.7?), hiding a frame while in its OnDragStop
339+
-- will trigger OnDragStop AGAIN
337340

338-
TMW:Group_Insert(group, domain, ID)
341+
if group then
342+
groupSelect:SetDraggingGroup(nil, nil, nil)
343+
TMW:Group_Insert(group, domain, ID)
344+
end
339345

340346
-- It will be hidden when the global update happens.
341347
-- We should keep it shown, though.
@@ -467,6 +473,7 @@ function TMW:Group_Add(domain, view)
467473
end
468474

469475
function TMW:Group_Insert(group, targetDomain, targetID)
476+
print(group, targetDomain, targetID)
470477
if InCombatLockdown() then
471478
-- Error if we are in combat because TMW:Update() won't update the groups instantly if we are.
472479
error("TMW: Can't swap groups while in combat")

0 commit comments

Comments
 (0)