From 366d3edf4e769c5228fc9b54169978a12ba7478a Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 24 Aug 2008 07:59:55 +0000 Subject: [PATCH] Fixes an issue that prevented the "Reset waypoints" command from working --- TomTom.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index 1a93672..51125dc 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -159,6 +159,10 @@ end function TomTom:ReloadWaypoints() local pc, pz = GetCurrentMapContinent(), GetCurrentMapZone() + for uid,value in pairs(waypoints) do + self:ClearWaypoint(uid) + end + waypoints = {} self.waypoints = waypoints self.waypointprofile = self.waydb.profile @@ -335,9 +339,7 @@ StaticPopupDialogs["TOMTOM_REMOVE_ALL_CONFIRM"] = { button1 = L["Yes"], button2 = L["No"], OnAccept = function() - for uid,point in pairs(waypoints) do - TomTom.waydb:ResetProfile() - end + TomTom.waydb:ResetProfile() TomTom:ReloadWaypoints() end, timeout = 30, -- 1.7.9.5