From 072db74800a825c7888dfc442a6db3d44d70fd63 Mon Sep 17 00:00:00 2001 From: Anch Date: Tue, 2 Nov 2021 18:13:08 +1300 Subject: [PATCH] fixed sub table name not changing --- AtlasLoot/Core/AtlasLoot.lua | 7 +++++++ AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index 90beb3c..260c1dd 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -789,6 +789,12 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) lastType = dataSource[dataID].Type end + if SelectedTableTextSet then + AtlasLootDefaultFrame_SelectedTable:SetText(AtlasLoot_TableNames[dataID][1]); + else + AtlasLootDefaultFrame_SelectedTable:SetText(""); + end + AtlasLootItemsFrame.refresh = {dataID, dataSource_backup, boss, pFrame}; if dataID ~= "FilterList" then AtlasLootItemsFrame.refreshOri = {dataID, dataSource_backup, boss, pFrame} @@ -858,6 +864,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) end end + end --For Alphamap and Atlas integration, show a 'close' button to hide the loot table and restore the map view diff --git a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua index 094518d..68a29c4 100644 --- a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua +++ b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrame.lua @@ -53,6 +53,7 @@ function AtlasLoot_DewDropClick(tablename, text, tabletype) AtlasLootDefaultFrame_SubMenu:Disable(); AtlasLootDefaultFrame_SelectedTable:SetText(""); AtlasLootDefaultFrame_SelectedTable:Show(); + SelectedTableTextSet = false; else --Enable the submenu button AtlasLootDefaultFrame_SubMenu:Enable(); @@ -69,7 +70,8 @@ function AtlasLoot_DewDropClick(tablename, text, tabletype) else AtlasLootDefaultFrame_SelectedTable:SetText(AtlasLoot_TableNames[AtlasLoot_DewDropDown_SubTables[tablename][1][2]][1]); end - AtlasLootDefaultFrame_SelectedTable:Show(); + AtlasLootDefaultFrame_SelectedTable:Show(); + SelectedTableTextSet = true; end --Show the category that has been selected AtlasLootDefaultFrame_SelectedCategory:SetText(text);