Fixed multiple options issue
p3lim-52096 [10-19-08 - 17:54]
Fixed multiple options issue
git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@28 ae24c21f-2f0c-4c94-9256-0092abe71e0d
diff --git a/pMinimap/pMinimap.lua b/pMinimap/pMinimap.lua
index f3cbab5..ea553b8 100644
--- a/pMinimap/pMinimap.lua
+++ b/pMinimap/pMinimap.lua
@@ -1,5 +1,5 @@
pMinimap = CreateFrame('Frame', 'pMinimap', UIParent)
-pMinimap:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end)
+pMinimap:SetScript('OnEvent', function(self, event, ...) self[event](self, event, ...) end)
pMinimap:RegisterEvent('ADDON_LOADED')
function pMinimap.ADDON_LOADED(self)
diff --git a/pMinimap/pMinimapConfig.lua b/pMinimap/pMinimapConfig.lua
index 724bfaa..273491c 100644
--- a/pMinimap/pMinimapConfig.lua
+++ b/pMinimap/pMinimapConfig.lua
@@ -91,11 +91,13 @@ local function CreateOptions(self, db)
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -156)
end
-function pMinimap.PLAYER_ENTERING_WORLD()
+function pMinimap.PLAYER_ENTERING_WORLD(self, event)
local db = pMinimapDB or {point = {'TOPRIGHT', 'UIParent', 'TOPRIGHT', -15, -15}, scale = 0.9, offset = 1, colors = {0, 0, 0, 1}, durability = true}
LibStub('LibSimpleOptions-1.0').AddOptionsPanel('pMinimap', function(self) CreateOptions(self, db) end)
LibStub('LibSimpleOptions-1.0').AddSlashCommand('pMinimap', '/pminimap', '/pmm')
+ self:UnregisterEvent(event)
+
pMinimapDB = db
end
\ No newline at end of file