# HG changeset patch # User glx # Date 1202349399 0 # Node ID aea80814ba2b807059afb2d8cc71d5e3326ed336 # Parent 83450457346bbfbc02a6a72d34328f5dbb900f6d (svn r12076) -Fix: when reusing a renamed deleted waypoint, keep the new name diff --git a/src/waypoint.cpp b/src/waypoint.cpp --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -197,7 +197,7 @@ wp_auto_delete = wp; - wp->town_index = 0; + wp->town_index = INVALID_TOWN; wp->name = NULL; wp->town_cn = 0; } else if (flags & DC_EXEC) { @@ -241,7 +241,7 @@ wp->deleted = 0; wp->build_date = _date; - if (wp->town_index == 0) MakeDefaultWaypointName(wp); + if (wp->town_index == INVALID_TOWN) MakeDefaultWaypointName(wp); UpdateWaypointSign(wp); RedrawWaypointSign(wp);