From b2b429f6ca7e04bc4b60957380a609fbdd820d60 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Wed, 23 Mar 2016 17:47:25 +0100 Subject: [PATCH] working on alt click change for tbc compatibility --- auction_listing.lua | 7 +++---- search_frame.lua | 15 +++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/auction_listing.lua b/auction_listing.lua index f40b4ff..ece8497 100644 --- a/auction_listing.lua +++ b/auction_listing.lua @@ -144,14 +144,13 @@ local methods = { DressUpItemLink(this.row.data.record.hyperlink) elseif IsShiftKeyDown() and ChatFrameEditBox:IsVisible() then ChatFrameEditBox:Insert(this.row.data.record.hyperlink) - elseif IsAltKeyDown() then - if this.rt.handlers.OnCellAltClick then - this.rt.handlers.OnCellAltClick(this, button) - end elseif button == 'RightButton' then Aux.search_frame.start_search(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact') else this.rt:SetSelectedRecord(this.row.data.record) + if this.rt.handlers.OnCellAltClick then + this.rt.handlers.OnCellAltClick(this, button) + end end end, diff --git a/search_frame.lua b/search_frame.lua index 05513d0..3848e91 100644 --- a/search_frame.lua +++ b/search_frame.lua @@ -697,12 +697,19 @@ function public.on_load() private.results_listing:Show() private.results_listing:SetSort(9) private.results_listing:Clear() - private.results_listing:SetHandler('OnCellAltClick', function(cell, button) - private.results_listing:SetSelectedRecord(nil) - private.find_auction_and_bid(cell.row.data.record, button == 'LeftButton') - end) private.results_listing:SetHandler('OnSelectionChanged', function(rt, datum) if not datum then return end + + if IsAltKeyDown() and private.results_listing:GetSelection() == datum then + if arg1 == 'LeftButton' and private.buyout_button:IsEnabled() then + private.buyout_button:Click() + return + elseif arg1 == 'RightButton' and private.bid_button:IsEnabled() then + private.bid_button:Click() + return + end + end + private.find_auction(datum.record) end)