diff --git a/core.lua b/core.lua index 73d7cb7..ec207e9 100644 --- a/core.lua +++ b/core.lua @@ -39,7 +39,7 @@ do end function public.on_load() - public.version = '3.1.0' + public.version = '3.2.0' public.blizzard_ui_shown = false public.bids_loaded = false public.current_owner_page = nil @@ -359,10 +359,7 @@ function private.SetItemRef(...) local item_info = m.info.item(tonumber(({strfind(itemstring, '^item:(%d+)')})[3])) if item_info then m.search_tab.set_filter(strlower(item_info.name)..'/exact') - if m.real_time_button:GetChecked() then - m.real_time_button:Click() - end - m.search_tab.execute() + m.search_tab.execute(nil, false) return end end @@ -380,10 +377,7 @@ function private.UseContainerItem(...) item_info = item_info and m.info.item(item_info.item_id) if item_info then m.search_tab.set_filter(strlower(item_info.name)..'/exact') - if m.real_time_button:GetChecked() then - m.real_time_button:Click() - end - m.search_tab.execute() + m.search_tab.execute(nil, false) end return end diff --git a/tables/auction_listing.lua b/tables/auction_listing.lua index 23084e6..6fe73ee 100644 --- a/tables/auction_listing.lua +++ b/tables/auction_listing.lua @@ -655,10 +655,7 @@ local methods = { elseif Aux.unmodified() and button == 'RightButton' then -- TODO not when alt (how?) Aux.tab_group:set_tab(1) Aux.search_tab.set_filter(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact') - if m.real_time_button:GetChecked() then - m.real_time_button:Click() - end - Aux.search_tab.execute() + Aux.search_tab.execute(nil, false) else local selection = this.rt:GetSelection() if not selection or selection.record ~= this.row.data.record then diff --git a/tabs/post/frames.lua b/tabs/post/frames.lua index cb2f4aa..327b79b 100644 --- a/tabs/post/frames.lua +++ b/tabs/post/frames.lua @@ -82,10 +82,7 @@ Aux.post_tab.FRAMES(function(m, public, private) elseif arg1 == 'RightButton' then Aux.tab_group:set_tab(1) Aux.search_tab.set_filter(strlower(Aux.info.item(this.item_record.item_id).name)..'/exact') - if m.real_time_button:GetChecked() then - m.real_time_button:Click() - end - Aux.search_tab.execute() + Aux.search_tab.execute(nil, false) end end, function() diff --git a/tabs/search/core.lua b/tabs/search/core.lua index a89a3c7..94a137e 100644 --- a/tabs/search/core.lua +++ b/tabs/search/core.lua @@ -412,7 +412,11 @@ function private.start_search(queries, continuation) } end -function public.execute(resume) +function public.execute(resume, real_time) + if real_time == nil then + real_time = m.real_time_button:GetChecked() + end + if resume then m.search_box:SetText(m.current_search().filter_string) end @@ -421,7 +425,7 @@ function public.execute(resume) local queries = Aux.scan_util.parse_filter_string(filter_string) if not queries then return - elseif m.real_time_button:GetChecked() then + elseif real_time then if getn(queries) > 1 then Aux.log('Invalid filter: The real time mode does not support multiple queries') return @@ -438,7 +442,7 @@ function public.execute(resume) if resume then m.results_listing:SetSelectedRecord() else - if m.current_search().real_time ~= m.real_time_button:GetChecked() then + if m.current_search().real_time ~= real_time then m.results_listing:Reset() end m.current_search().records = {} @@ -452,8 +456,8 @@ function public.execute(resume) m.close_settings() m.update_tab(m.RESULTS) - m.current_search().real_time = m.real_time_button:GetChecked() - if m.real_time_button:GetChecked() then + m.current_search().real_time = real_time + if real_time then m.start_real_time_scan(queries[1], nil, continuation) else for _, query in queries do diff --git a/tabs/search/frames.lua b/tabs/search/frames.lua index 7c419b5..45ea87c 100644 --- a/tabs/search/frames.lua +++ b/tabs/search/frames.lua @@ -66,7 +66,7 @@ Aux.search_tab.FRAMES(function(m, public, private) end do local editbox = Aux.gui.editbox(m.settings) - editbox:SetPoint('LEFT', 70, 0) + editbox:SetPoint('LEFT', 75, 0) editbox:SetWidth(50) editbox:SetNumeric(true) editbox:SetMaxLetters(nil) @@ -111,7 +111,7 @@ Aux.search_tab.FRAMES(function(m, public, private) end end) local label = Aux.gui.label(editbox, 16) - label:SetPoint('RIGHT', editbox, 'LEFT', -3, 0) + label:SetPoint('RIGHT', editbox, 'LEFT', -3.5, 0) label:SetText('-') label:SetTextColor(unpack(Aux.gui.config.text_color.enabled)) private.last_page_input = editbox @@ -253,10 +253,7 @@ Aux.search_tab.FRAMES(function(m, public, private) local item_info = Aux.cursor_item() and Aux.info.item(Aux.cursor_item().item_id) if item_info then m.set_filter(strlower(item_info.name)..'/exact') - if m.real_time_button:GetChecked() then - m.real_time_button:Click() - end - m.execute() + m.execute(nil, false) end ClearCursor() end)