From 526fdeb44c843420adbc793f00c8cbad36d6005a Mon Sep 17 00:00:00 2001 From: p3lim-52096 Date: Mon, 27 Apr 2009 00:25:35 +0000 Subject: [PATCH] Fixed coord text beeing shown if there is no coords Removed a global function git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@92 ae24c21f-2f0c-4c94-9256-0092abe71e0d --- pMinimap/pMinimap.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pMinimap/pMinimap.lua b/pMinimap/pMinimap.lua index c4ea38d..f56c10c 100644 --- a/pMinimap/pMinimap.lua +++ b/pMinimap/pMinimap.lua @@ -34,7 +34,11 @@ do total = 0.25 local x, y = GetPlayerMapPosition('player') - self.Text:SetFormattedText('%.0f,%.0f', x * 100, y * 100) + if(x ~= 0 and y ~= 0 and not IsInInstance()) then + self.Text:SetFormattedText('%.0f,%.0f', x * 100, y * 100) + else + self.Text:SetText() + end end end end @@ -96,6 +100,8 @@ local function optionsPanel(self) end local function Initialize(self) + Minimap:EnableMouseWheel() + Minimap:SetScript('OnMouseWheel', onMouseWheel) MinimapZoomIn:Hide() MinimapZoomOut:Hide() @@ -147,8 +153,6 @@ local function Initialize(self) MiniMapVoiceChatFrame.Show = MiniMapVoiceChatFrame.Hide MinimapNorthTag:SetAlpha(0) - Minimap:EnableMouseWheel() - Minimap:SetScript('OnMouseWheel', onMouseWheel) Minimap:SetScale(self.db.scale) Minimap:SetFrameLevel(self.db.level) Minimap:SetFrameStrata(self.db.strata) @@ -248,7 +252,6 @@ function pMinimap:ADDON_LOADED(event, addon) pMinimapDB.unlocked = false self.db = pMinimapDB - self.onCoordUpdate = onUpdate self:UnregisterEvent(event) InterfaceOptionsDisplayPanelShowClock.setFunc('1') -- 1.7.9.5