Copy instead of referencing
Scott Sibley [09-10-10 - 21:06]
Copy instead of referencing
diff --git a/Modules/Bars.lua b/Modules/Bars.lua
index c7c9c11..1ff447d 100644
--- a/Modules/Bars.lua
+++ b/Modules/Bars.lua
@@ -245,7 +245,7 @@ function mod:OnInitialize()
for k, v in pairs(defaultWidgets) do
if not v.tagged and not v.deleted then
- self.db.profile.bars[k] = v
+ self.db.profile.bars[k] = copy(v)
end
end
diff --git a/Modules/Histograms.lua b/Modules/Histograms.lua
index e6a19ef..1b18bc1 100644
--- a/Modules/Histograms.lua
+++ b/Modules/Histograms.lua
@@ -223,7 +223,7 @@ function mod:OnInitialize()
for k, v in pairs(defaultWidgets) do
if not v.tagged and not v.deleted then
- self.db.profile.histograms[k] = v
+ self.db.profile.histograms[k] = copy(v)
end
end