working on alt click change for tbc compatibility

This commit is contained in:
Manuel Simon Hirsig
2016-03-23 18:07:57 +01:00
parent b2b429f6ca
commit 5ce6de530a
2 changed files with 11 additions and 9 deletions
+6 -4
View File
@@ -144,12 +144,14 @@ local methods = {
DressUpItemLink(this.row.data.record.hyperlink)
elseif IsShiftKeyDown() and ChatFrameEditBox:IsVisible() then
ChatFrameEditBox:Insert(this.row.data.record.hyperlink)
elseif button == 'RightButton' then
elseif button == 'RightButton' then -- TODO not when alt (how?)
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)
local selection = this.rt:GetSelection()
if not selection or selection.record ~= this.row.data.record then
this.rt:SetSelectedRecord(this.row.data.record)
elseif this.rt.handlers.OnCellClick then
this.rt.handlers.OnCellClick(this, button)
end
end
end,
+5 -5
View File
@@ -697,10 +697,8 @@ function public.on_load()
private.results_listing:Show()
private.results_listing:SetSort(9)
private.results_listing:Clear()
private.results_listing:SetHandler('OnSelectionChanged', function(rt, datum)
if not datum then return end
if IsAltKeyDown() and private.results_listing:GetSelection() == datum then
private.results_listing:SetHandler('OnCellClick', function(cell, button)
if IsAltKeyDown() and private.results_listing:GetSelection().record == cell.row.data.record then
if arg1 == 'LeftButton' and private.buyout_button:IsEnabled() then
private.buyout_button:Click()
return
@@ -709,7 +707,9 @@ function public.on_load()
return
end
end
end)
private.results_listing:SetHandler('OnSelectionChanged', function(rt, datum)
if not datum then return end
private.find_auction(datum.record)
end)