diff Summary.lua @ 27:95c813292a88

Fixed the ?Hide when below threshold? option.
author Zerotorescue
date Thu, 28 Oct 2010 19:31:58 +0200
parents 7d7aaa3fbe94
children e732843b16d2
line wrap: on
line diff
--- a/Summary.lua	Thu Oct 28 19:20:52 2010 +0200
+++ b/Summary.lua	Thu Oct 28 19:31:58 2010 +0200
@@ -278,7 +278,7 @@
 			local minimumStock = (values.minimumStock or (values.minimumStock == nil and addon.db.global.defaults.minimumStock));
 			local showWhenBelow = (values.summaryThresholdShow or (values.summaryThresholdShow == nil and addon.db.global.defaults.summaryThresholdShow));
 			local priceThreshold = (values.priceThreshold or (values.priceThreshold == nil and addon.db.global.defaults.priceThreshold));
-			local hideWhenBelowPriceThreshold = (values.hideFromSummaryWhenBelowPriceThreshold or (values.hideFromSummaryWhenBelowPriceThreshold == nil and addon.db.global.defaults.hideFromSummaryWhenBelowPriceThreshold));
+			local hideWhenBelowPriceThreshold = (values.summaryHidePriceThreshold or (values.summaryHidePriceThreshold == nil and addon.db.global.defaults.summaryHidePriceThreshold));
 			local alwaysGetAuctionValue = (values.alwaysGetAuctionValue or (values.alwaysGetAuctionValue == nil and addon.db.global.defaults.alwaysGetAuctionValue));
 			
 			-- Make group container
@@ -422,7 +422,7 @@
 			
 			-- Show itemslist
 			for i, item in pairs(itemsCache[groupName]) do
-				if ( item.count / minimumStock ) < showWhenBelow and not (hideWhenBelowPriceThreshold and item.value < priceThreshold) then
+				if ( item.count / minimumStock ) < showWhenBelow and not (hideWhenBelowPriceThreshold and item.value < priceThreshold and item.value >= 0) then
 					local btnItemLink = AceGUI:Create("ItemLinkButton");
 					btnItemLink:SetUserData("exec", function(_, itemId, _, buttonName)
 						local itemName, itemLink = GetItemInfo(itemId);