From 349dfd1d47b5441f19a886996a3f0ad8aec95ce0 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 6 Mar 2016 09:34:05 +0100 Subject: [PATCH] added clear button to search tab --- core.lua | 2 +- search_frame.lua | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core.lua b/core.lua index 3a8311a..1178da0 100644 --- a/core.lua +++ b/core.lua @@ -1,5 +1,5 @@ Aux = { - version = '2.6.10', + version = '2.6.11', blizzard_ui_shown = false, orig = {}, } diff --git a/search_frame.lua b/search_frame.lua index 5d2a4c3..ec03045 100644 --- a/search_frame.lua +++ b/search_frame.lua @@ -3,6 +3,7 @@ Aux.search_frame = public aux_favorite_searches = {} aux_recent_searches = {} +local scanned_records = {} private.popup_info = { rename = {} @@ -289,6 +290,17 @@ function public.on_load() btn:Disable() private.buyout_button = btn end + do + local btn = Aux.gui.button(AuxSearchFrameResults, 16) + btn:SetPoint('TOPLEFT', private.buyout_button, 'TOPRIGHT', 5, 0) + btn:SetWidth(80) + btn:SetHeight(24) + btn:SetText('Clear') + btn:SetScript('OnClick', function() + while tremove(scanned_records) do end + private.results_listing:SetDatabase() + end) + end do local btn1 = Aux.gui.button(AuxSearchFrameFilter, 16) btn1:SetPoint('TOPLEFT', private.status_bar, 'TOPRIGHT', 5, 0) @@ -786,7 +798,7 @@ function public.start_search(filter_string) private.status_bar:set_text('Scanning auctions...') private.results_listing:Clear() - local scanned_records = {} + scanned_records = {} private.results_listing:SetDatabase(scanned_records) local current_query