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) DressUpItemLink(this.row.data.record.hyperlink)
elseif IsShiftKeyDown() and ChatFrameEditBox:IsVisible() then elseif IsShiftKeyDown() and ChatFrameEditBox:IsVisible() then
ChatFrameEditBox:Insert(this.row.data.record.hyperlink) 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') Aux.search_frame.start_search(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact')
else else
this.rt:SetSelectedRecord(this.row.data.record) local selection = this.rt:GetSelection()
if this.rt.handlers.OnCellAltClick then if not selection or selection.record ~= this.row.data.record then
this.rt.handlers.OnCellAltClick(this, button) this.rt:SetSelectedRecord(this.row.data.record)
elseif this.rt.handlers.OnCellClick then
this.rt.handlers.OnCellClick(this, button)
end end
end end
end, end,
+5 -5
View File
@@ -697,10 +697,8 @@ function public.on_load()
private.results_listing:Show() private.results_listing:Show()
private.results_listing:SetSort(9) private.results_listing:SetSort(9)
private.results_listing:Clear() private.results_listing:Clear()
private.results_listing:SetHandler('OnSelectionChanged', function(rt, datum) private.results_listing:SetHandler('OnCellClick', function(cell, button)
if not datum then return end if IsAltKeyDown() and private.results_listing:GetSelection().record == cell.row.data.record then
if IsAltKeyDown() and private.results_listing:GetSelection() == datum then
if arg1 == 'LeftButton' and private.buyout_button:IsEnabled() then if arg1 == 'LeftButton' and private.buyout_button:IsEnabled() then
private.buyout_button:Click() private.buyout_button:Click()
return return
@@ -709,7 +707,9 @@ function public.on_load()
return return
end end
end end
end)
private.results_listing:SetHandler('OnSelectionChanged', function(rt, datum)
if not datum then return end
private.find_auction(datum.record) private.find_auction(datum.record)
end) end)