Quantcast

Stupid user protection

Darthpred [02-21-13 - 07:54]
Stupid user protection
Changing quest, active and orientation options right after enabling the module (before reloading) will no longer cause errors.
Filename
ElvUI_SLE/modules/farm/options.lua
diff --git a/ElvUI_SLE/modules/farm/options.lua b/ElvUI_SLE/modules/farm/options.lua
index ae3b7f8..f7b375d 100644
--- a/ElvUI_SLE/modules/farm/options.lua
+++ b/ElvUI_SLE/modules/farm/options.lua
@@ -25,7 +25,7 @@ E.Options.args.sle.args.farm = {
 			desc = L['Only show the buttons for the seeds, portals, tools you have in your bags.'],
 			disabled = function() return not E.private.sle.farm.enable end,
 			get = function(info) return E.db.sle.farm.active end,
-			set = function(info, value) E.db.sle.farm.active = value F:UpdateLayout() end,
+			set = function(info, value) E.db.sle.farm.active = value; if SeedAnchor then F:UpdateLayout() end end,
 		},
 		size = {
 			order = 4,
@@ -65,7 +65,7 @@ E.Options.args.sle.args.farm = {
 					name = L["Quest Glow"],
 					desc = L["Show glowing border and exclamation mark on seeds needed for any quest in your log."],
 					get = function(info) return E.db.sle.farm.quest end,
-					set = function(info, value) E.db.sle.farm.quest = value; F:UpdateLayout() end
+					set = function(info, value) E.db.sle.farm.quest = value; if SeedAnchor then F:UpdateLayout() end end
 				},
 				growth = {
 					order = 8,
@@ -74,7 +74,7 @@ E.Options.args.sle.args.farm = {
 					desc = L["Change the position from where seed bars will grow."],
 					disabled = function() return not E.private.sle.farm end,
 					get = function(info) return E.db.sle.farm.seedor end,
-					set = function(info, value) E.db.sle.farm.seedor = value; F:UpdateLayout() end,
+					set = function(info, value) E.db.sle.farm.seedor = value; if SeedAnchor then F:UpdateLayout() end end,
 					values = {
 						['RIGHT'] = L["Right"],
 						['LEFT'] = L["Left"],