From f3822f8059b3980b23bb06b6b2eed3d42de369ff Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 10 Feb 2017 19:31:57 +0100 Subject: [PATCH] post deselection, historical value selection bugfix --- tabs/post/frame.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tabs/post/frame.lua b/tabs/post/frame.lua index 4c0ea1b..6bf52d4 100644 --- a/tabs/post/frame.lua +++ b/tabs/post/frame.lua @@ -81,10 +81,14 @@ bid_listing:SetColInfo{ {name='% Hist.\nValue', width=.21, align='CENTER'}, } bid_listing:SetSelection(function(data) - return data.record == bid_selection + return data.record == bid_selection or data.record.historical_value and bid_selection and bid_selection.historical_value end) bid_listing:SetHandler('OnClick', function(table, row_data, column, button) - bid_selection = row_data.record + if row_data.record == bid_selection or row_data.record.historical_value and bid_selection and bid_selection.historical_value then + bid_selection = nil + else + bid_selection = row_data.record + end refresh = true end) bid_listing:SetHandler('OnDoubleClick', function(table, row_data, column, button) @@ -101,10 +105,14 @@ buyout_listing:SetColInfo{ {name='% Hist.\nValue', width=.20, align='CENTER'}, } buyout_listing:SetSelection(function(data) - return data.record == buyout_selection + return data.record == buyout_selection or data.record.historical_value and buyout_selection and buyout_selection.historical_value end) buyout_listing:SetHandler('OnClick', function(table, row_data, column, button) - buyout_selection = row_data.record + if row_data.record == buyout_selection or row_data.record.historical_value and buyout_selection and buyout_selection.historical_value then + buyout_selection = nil + else + buyout_selection = row_data.record + end refresh = true end) buyout_listing:SetHandler('OnDoubleClick', function(table, row_data, column, button)