From bef0436c537650e1900f71f6a1f18cfde1351a91 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 10 Apr 2010 07:44:06 +0000 Subject: [PATCH] Add:core:New map flag to enable/disable searching git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3148 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/attr_def.h | 1 + navit/navit/mapset.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/navit/navit/attr_def.h b/navit/navit/attr_def.h index 55b5b3f..84b9bac 100644 --- a/navit/navit/attr_def.h +++ b/navit/navit/attr_def.h @@ -191,6 +191,7 @@ ATTR(tell_street_name) ATTR(bluetooth) ATTR(signal_on_map_click) ATTR(route_active) +ATTR(search_active) ATTR2(0x0002ffff,type_int_end) ATTR2(0x00030000,type_string_begin) ATTR(type) diff --git a/navit/navit/mapset.c b/navit/navit/mapset.c index 41d39b5..6a3608e 100644 --- a/navit/navit/mapset.c +++ b/navit/navit/mapset.c @@ -198,6 +198,12 @@ struct map * mapset_next(struct mapset_handle *msh, int active) else continue; } + if (active == 3 && map_get_attr(ret, attr_search_active, &active_attr, NULL)) { + if (active_attr.u.num) + return ret; + else + continue; + } if (!map_get_attr(ret, attr_active, &active_attr, NULL)) return ret; if (active_attr.u.num) @@ -294,6 +300,10 @@ mapset_search_get_item(struct mapset_search *this) this->map=g_list_next(this->map); if (! this->map) break; + if (map_get_attr(this->map->data, attr_search_active, &active_attr, NULL)) { + if (!active_attr.u.num) + continue; + } if (!map_get_attr(this->map->data, attr_active, &active_attr, NULL)) break; if (active_attr.u.num) -- 2.7.4