From e7245e1b1f1a71e2005931b49c34e990660e7089 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Tue, 1 Mar 2011 18:07:21 +0000 Subject: [PATCH] Fixes issue 14 --- TomTom_CrazyArrow.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/TomTom_CrazyArrow.lua b/TomTom_CrazyArrow.lua index c1a46ad..1b1457e 100644 --- a/TomTom_CrazyArrow.lua +++ b/TomTom_CrazyArrow.lua @@ -293,18 +293,19 @@ local dropdown_info = { TomTom:RemoveWaypoint(uid) end, }, - { - -- Remove all waypoints from this zone - text = L["Remove all waypoints from this zone"], - func = function() - local uid = active_point - local waypoints = TomTom.waypoints - local data = waypoints[uid] - for uid in pairs(waypoints[data.zone]) do - TomTom:RemoveWaypoint(uid) - end - end, - }, + { + -- Remove all waypoints from this zone + text = L["Remove all waypoints from this zone"], + func = function() + local uid = active_point + local data = uid + local mapId = data[1] + for key, waypoint in pairs(TomTom.waypoints[mapId]) do + TomTom:RemoveWaypoint(waypoint) + end + + end, + }, { -- Remove all waypoints text = L["Remove all waypoints"], -- 1.7.9.5