@@ -1117,7 +1117,7 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
11171117 end
11181118 -- Whisper so we can copy to clipboard
11191119 controls [" whisperButton" .. row_idx ] = new (" ButtonControl" ,
1120- { " TOPLEFT" , controls [" importButton" .. row_idx ], " TOPRIGHT" }, { 8 , 0 , 185 , row_height }, function ()
1120+ { " TOPLEFT" , controls [" importButton" .. row_idx ], " TOPRIGHT" }, { 8 , 0 , 170 , row_height }, function ()
11211121 local itemResult = self .itemIndexTbl [row_idx ] and self .resultTbl [row_idx ][self .itemIndexTbl [row_idx ]]
11221122
11231123 if not itemResult then return " " end
@@ -1128,7 +1128,7 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
11281128 if itemResult .whisper then
11291129 return price and " Whisper for " .. price or " Whisper"
11301130 else
1131- return price and " Search for selected item "
1131+ return price and " Search for " .. price or " Search "
11321132 end
11331133
11341134 end , function ()
@@ -1137,11 +1137,14 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
11371137 Copy (itemResult .whisper )
11381138 else
11391139 local exactQuery = dkjson .decode (self .lastQuery )
1140- -- use trade sum to get the specific item. we could also add the
1141- -- trader name as it is contained in the fetch responses, but
1142- -- this alone doesn't seem to really result in multiple results.
1143- -- trade weight min is exclusive while max is inclusive (makes no sense to me)
1144- exactQuery .query .stats [1 ].value = { min = tonumber (itemResult .weight ) - 0.1 , max = tonumber (itemResult .weight ) }
1140+ -- use trade sum to get the specific item. both min and max
1141+ -- weight fields seem to be inconsistent. making the minimum
1142+ -- e.g. exactly 172.3 as on the result item does not always work
1143+ exactQuery .query .stats [1 ].value = { min = floor (itemResult .weight , 1 ) - 0.1 , max = round (itemResult .weight , 1 ) + 0.1 }
1144+ -- also apply trader name. this should make false positives
1145+ -- extremely unlikely. this doesn't seem to take up a filter
1146+ -- slot
1147+ exactQuery .query .filters .trade_filters = { filters = { account = itemResult .trader } }
11451148
11461149 local exactQueryStr = dkjson .encode (exactQuery )
11471150
0 commit comments