Fix:Core:Search only in active maps
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 27 Feb 2008 22:01:31 +0000 (22:01 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 27 Feb 2008 22:01:31 +0000 (22:01 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@924 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/mapset.c

index e118bb9..5c805cb 100644 (file)
@@ -1,3 +1,4 @@
+#include <string.h>
 #include <glib.h>
 #include <glib/gprintf.h>
 #include "debug.h"
@@ -100,7 +101,9 @@ mapset_search_get_item(struct mapset_search *this)
        while (!(ret=map_search_get_item(this->ms))) {
                if (this->search_attr->type >= attr_country_all && this->search_attr->type <= attr_country_name)
                        break;
-               this->map=g_list_next(this->map);
+               do {
+                       this->map=g_list_next(this->map);
+               } while (this->map && ! map_get_active(this->map->data));
                if (! this->map)
                        break;
                map_search_destroy(this->ms);