# HG changeset patch # User James D. Callahan III # Date 1349464553 18000 # Node ID 0c4a6ea88403011b08df41512d2d046ee99306b7 # Parent 6c16692eebb0b7bcb07a902d400e23e5ab5ee002 Before setting current_area_id, check to see if the area ID the map is set to matches current_area_id to avoid opening/closing the WorldMapFrame unnecessarily. diff -r 6c16692eebb0 -r 0c4a6ea88403 Main.lua --- a/Main.lua Thu Oct 04 14:10:39 2012 -0500 +++ b/Main.lua Fri Oct 05 14:15:53 2012 -0500 @@ -609,9 +609,13 @@ } function WDP:SetCurrentAreaID(event_name) + local map_area_id = _G.GetCurrentMapAreaID() + + if map_area_id == current_area_id then + return + end local world_map = _G.WorldMapFrame local map_visible = world_map:IsVisible() - local map_area_id = _G.GetCurrentMapAreaID() local sfx_value = _G.tonumber(_G.GetCVar("Sound_EnableSFX")) if not map_visible then