From be3ee48b7c865995eb15ed2d4a37763425675894 Mon Sep 17 00:00:00 2001 From: Anch Date: Wed, 28 Sep 2022 17:54:46 +1300 Subject: [PATCH] update wishlist delete item -Updated wishlist delete item to resort items on delete --- AtlasLoot/Core/WishList.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AtlasLoot/Core/WishList.lua b/AtlasLoot/Core/WishList.lua index 7994e9d..25cd679 100644 --- a/AtlasLoot/Core/WishList.lua +++ b/AtlasLoot/Core/WishList.lua @@ -256,7 +256,7 @@ end --[[ AtlasLoot_DeleteFromWishList(itemID) Deletes the specified items from the wishlist -]] +]] function AtlasLoot_DeleteFromWishList(itemID) if itemID and itemID == 0 then return end if AtlasLootItemsFrame.refresh[2] == "AtlasLootWishList" then @@ -264,6 +264,10 @@ function AtlasLoot_DeleteFromWishList(itemID) if v[2] == itemID then DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(v[4])..GREY..AL[" deleted from the WishList."]..WHITE.." (".._G[AtlasLootItemsFrame.refresh[2]][AtlasLootItemsFrame.refresh[1]][AtlasLootItemsFrame.refresh[3]].Name..")"); table.remove(_G[AtlasLootItemsFrame.refresh[2]][AtlasLootItemsFrame.refresh[1]][AtlasLootItemsFrame.refresh[3]], i); + --Sort wishlist after deleting an item + for n,table in ipairs(_G[AtlasLootItemsFrame.refresh[2]][AtlasLootItemsFrame.refresh[1]][AtlasLootItemsFrame.refresh[3]]) do + table[1] = n; + end break; end end