x
Steven Jackson [01-10-15 - 22:47]
diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
index bc903a5..8742eb7 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
@@ -435,21 +435,24 @@ function PLUGIN:RefreshFarmingTools()
end
for i = 1, NUM_SEED_BARS do
+
local seedBar = _G["FarmSeedBar"..i]
count = 0
- for i, button in ipairs(seedButtons[i]) do
- local BUTTONSIZE = seedBar.ButtonSize;
- button:SetPointToScale("TOPLEFT", seedBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1))
- button:SetSizeToScale(BUTTONSIZE,BUTTONSIZE)
- if (not self.db.general.farming.onlyactive or (self.db.general.farming.onlyactive and button.items > 0)) then
- button.icon:SetVertexColor(1,1,1)
- count = count + 1
- elseif (not self.db.general.farming.onlyactive and button.items <= 0) then
- button:Show()
- button.icon:SetVertexColor(0.25,0.25,0.25)
- count = count + 1
- else
- button:Hide()
+ if(seedButtons[i]) then
+ for i, button in ipairs(seedButtons[i]) do
+ local BUTTONSIZE = seedBar.ButtonSize;
+ button:SetPointToScale("TOPLEFT", seedBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1))
+ button:SetSizeToScale(BUTTONSIZE,BUTTONSIZE)
+ if (not self.db.general.farming.onlyactive or (self.db.general.farming.onlyactive and button.items > 0)) then
+ button.icon:SetVertexColor(1,1,1)
+ count = count + 1
+ elseif (not self.db.general.farming.onlyactive and button.items <= 0) then
+ button:Show()
+ button.icon:SetVertexColor(0.25,0.25,0.25)
+ count = count + 1
+ else
+ button:Hide()
+ end
end
end
if(self.db.general.farming.onlyactive and not self.db.general.farming.undocked) then