From 71dcf8cc8d630af9f7d90386a488e8f5cb475bfe Mon Sep 17 00:00:00 2001 From: Anch Date: Wed, 10 Aug 2022 20:49:39 +1200 Subject: [PATCH] added right click to exit advanced search --- AtlasLoot/Core/SearchAdvanced.lua | 5 +---- AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/AtlasLoot/Core/SearchAdvanced.lua b/AtlasLoot/Core/SearchAdvanced.lua index 965a725..7f16dd2 100644 --- a/AtlasLoot/Core/SearchAdvanced.lua +++ b/AtlasLoot/Core/SearchAdvanced.lua @@ -225,14 +225,11 @@ function AtlasLoot_AdvancedSearchShow() AtlasLoot_BossName:SetText("Advanced Search"); - --AtlasLootDefaultFrame_AdvancedSearchPanel:ClearAllPoints(); - --AtlasLootDefaultFrame_AdvancedSearchPanel:SetParent(pFrame[2]); - -- AtlasLootDefaultFrame_AdvancedSearchPanel:ClearAllPoints(); - --AtlasLootDefaultFrame_AdvancedSearchPanel:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]); AtlasLootDefaultFrame_AdvancedSearchPanel:Show(); ATLASLOOT_CURRENTTYPE = "Search"; AtlasLoot:ScrollFrameUpdate(); + AtlasLoot:SubTableScrollFrameUpdate("EmptyTable",AtlasLoot_Data); end function AtlasLoot_AdvancedSearchClose() diff --git a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua index 2a9ff56..496e32a 100644 --- a/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua +++ b/AtlasLoot/DefaultFrame/AtlaslootDefaultFrameCreate.lua @@ -53,7 +53,9 @@ local lootbground = CreateFrame("Frame", "AtlasLootDefaultFrame_LootBackground", lootbground:EnableMouse(); lootbground:SetScript("OnMouseDown",function(self, button) if AtlasLootItemsFrame.refresh[2][AtlasLootItemsFrame.refresh[1]].Back and button == "RightButton" then - AtlasLoot:BackButton_OnClick() + AtlasLoot:BackButton_OnClick(); + elseif AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() and button == "RightButton" then + AtlasLoot_AdvancedSearchClose(); end end); @@ -495,7 +497,7 @@ function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, pFrame, tabl local value = i + offset subtableFrame.rows[i]:SetChecked(false); subtableFrame.rows[i]:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD"); - if value <= maxValue and dataSource[tablename][value] then + if value <= maxValue and dataSource[tablename][value] and tablename ~= "SearchMENU" then local row = subtableFrame.rows[i] row.dataSource = dataSource; row.tablename = tablename;