From 5a4720bfd2fa3b6eba43c1b4f88d4bee808c88f4 Mon Sep 17 00:00:00 2001 From: Anch Date: Mon, 31 Jan 2022 02:11:15 +1300 Subject: [PATCH] fixed back button not working when atlas was opened before atlasloot --- AtlasLoot/Core/AtlasIntegration.lua | 2 +- AtlasLoot/Core/AtlasLoot.lua | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/AtlasLoot/Core/AtlasIntegration.lua b/AtlasLoot/Core/AtlasIntegration.lua index 2d39704..f7c0908 100644 --- a/AtlasLoot/Core/AtlasIntegration.lua +++ b/AtlasLoot/Core/AtlasIntegration.lua @@ -37,7 +37,7 @@ function AtlasLootBoss_OnClick(name) local zoneID = ATLAS_DROPDOWNS[AtlasOptions.AtlasType][AtlasOptions.AtlasZone]; local id = this.idnum; - + AtlasLoot_Lastboss = AtlasLootBossButtons[zoneID][id]; --If the loot table was already shown and boss clicked again, hide the loot table and fix boss list icons if getglobal(name.."_Selected"):IsVisible() then getglobal(name.."_Selected"):Hide(); diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index 4d6ed1c..bd5f3de 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -528,20 +528,18 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) --Ditch the Quicklook selector AtlasLoot_QuickLooks:Hide(); AtlasLootQuickLooksButton:Hide(); - + -- Hide the Filter Check-Box AtlasLootFilterCheck:Hide(); -- Hide Selector AtlasLootItemsFrame_DifficultyAtlasButton:Disable(); AtlasLootItemsFrame_DifficultyAtlasButton:Hide(); - + -- Updates AtlasLoot_Lastboss if your in a main loot table - if AtlasLoot_Hold == false then + if AtlasLoot_Hold == false or AtlasLoot_Lastboss == nil then AtlasLoot_Lastboss = dataID; end - - dataSource_backup = dataSource; if dataID == "SearchResult" or dataID == "WishList" then @@ -1121,6 +1119,8 @@ function AtlasLoot_NavButton_OnClick() AtlasLoot_ShowItemsFrame("WishList", this.lootpage, AL["Wishlist"], AtlasLootItemsFrame.refresh[4]); elseif AtlasLoot_Hold == true then AtlasLoot_ShowItemsFrame(AtlasLoot_Lastboss, AtlasLootItemsFrame.refresh[2], "", AtlasLootItemsFrame.refresh[4]); + -- Lets AtlasLoot_Lastboss be updated after going back to main table + AtlasLoot_Hold = false; else AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], "", AtlasLootItemsFrame.refresh[4]); end @@ -1128,8 +1128,6 @@ function AtlasLoot_NavButton_OnClick() --Fallback for if the requested loot page is a menu and does not have a .refresh instance AtlasLoot_ShowItemsFrame(this.lootpage, "", "", AtlasFrame); end - -- Lets AtlasLoot_Lastboss be updated after going back to main table - AtlasLoot_Hold = false; end --[[