Properly disables the modules
Mikeprod [10-02-16 - 11:43]
Properly disables the modules
diff --git a/modules/armor.lua b/modules/armor.lua
index 0f641ae..b2ea220 100644
--- a/modules/armor.lua
+++ b/modules/armor.lua
@@ -108,7 +108,7 @@ end
function ArmorModule:Refresh()
if self.armorFrame == nil then return; end
- if not xb.db.profile.modules.armor.enabled then return; end
+ if not xb.db.profile.modules.armor.enabled then self:Disable(); return; end
if InCombatLockdown() then
self:UpdateDurabilityText()
diff --git a/modules/clock.lua b/modules/clock.lua
index 206599e..58dc06c 100644
--- a/modules/clock.lua
+++ b/modules/clock.lua
@@ -64,7 +64,7 @@ end
function ClockModule:Refresh()
local db = xb.db.profile
if self.clockFrame == nil then return; end
- if not db.modules.clock.enabled then return; end
+ if not db.modules.clock.enabled then self:Disable(); return; end
if InCombatLockdown() then
self:SetClockColor()
diff --git a/modules/currency.lua b/modules/currency.lua
index 25b303d..91bd872 100644
--- a/modules/currency.lua
+++ b/modules/currency.lua
@@ -65,7 +65,7 @@ function CurrencyModule:Refresh()
return
end
if self.currencyFrame == nil then return; end
- if not db.modules.currency.enabled then return; end
+ if not db.modules.currency.enabled then self:Disable(); return; end
local iconSize = db.text.fontSize + db.general.barPadding
for i = 1, 3 do
diff --git a/modules/gold.lua b/modules/gold.lua
index 0726085..af08c71 100644
--- a/modules/gold.lua
+++ b/modules/gold.lua
@@ -40,7 +40,7 @@ end
function GoldModule:Refresh()
local db = xb.db.profile
if self.goldFrame == nil then return; end
- if not db.modules.gold.enabled then return; end
+ if not db.modules.gold.enabled then self:Disable(); return; end
if InCombatLockdown() then
self.goldText:SetFont(xb:GetFont(db.text.fontSize))
diff --git a/modules/micromenu.lua b/modules/micromenu.lua
index c6c44b3..a501fcd 100644
--- a/modules/micromenu.lua
+++ b/modules/micromenu.lua
@@ -81,7 +81,7 @@ end
function MenuModule:Refresh()
if self.frames.menu == nil then return; end
- if not xb.db.profile.modules.microMenu.enabled then return; end
+ if not xb.db.profile.modules.microMenu.enabled then self:Disable(); return; end
if InCombatLockdown() then
self:RegisterEvent('PLAYER_REGEN_ENABLED', function()
diff --git a/modules/system.lua b/modules/system.lua
index 7848688..dacccb4 100644
--- a/modules/system.lua
+++ b/modules/system.lua
@@ -33,7 +33,7 @@ end
function SystemModule:Refresh()
local db = xb.db.profile
if self.systemFrame == nil then return; end
- if not db.modules.system.enabled then return; end
+ if not db.modules.system.enabled then self:Disable(); return; end
if InCombatLockdown() then
self:UpdateTexts()
diff --git a/modules/talent.lua b/modules/talent.lua
index 31d5f15..96aa3a6 100644
--- a/modules/talent.lua
+++ b/modules/talent.lua
@@ -55,7 +55,7 @@ function TalentModule:Refresh()
local db = xb.db.profile
if self.talentFrame == nil then return; end
- if not db.modules.talent.enabled then return; end
+ if not db.modules.talent.enabled then self:Disable(); return; end
--local artifactId = 0
local artifactId = self.LAD:GetActiveArtifactID() or 0
diff --git a/modules/tradeskill.lua b/modules/tradeskill.lua
index 4a481cc..c840c1c 100644
--- a/modules/tradeskill.lua
+++ b/modules/tradeskill.lua
@@ -70,7 +70,7 @@ function TradeskillModule:Refresh()
end
local db = xb.db.profile
if self.tradeskillFrame == nil then return; end
- if not db.modules.tradeskill.enabled then return; end
+ if not db.modules.tradeskill.enabled then self:Disable(); return; end
local iconSize = db.text.fontSize + db.general.barPadding
local totalWidth = 0
diff --git a/modules/travel.lua b/modules/travel.lua
index e08b830..6fa75f8 100644
--- a/modules/travel.lua
+++ b/modules/travel.lua
@@ -365,6 +365,7 @@ end
function TravelModule:Refresh()
if self.hearthFrame == nil then return; end
+ if not xb.db.profile.modules.travel.enabled then self:Disable(); return; end
if InCombatLockdown() then
self.hearthText:SetText(GetBindLocation())
self.portText:SetText(xb.db.char.portItem.text)