From: tegzed Date: Mon, 28 Mar 2011 06:05:17 +0000 (+0000) Subject: Fix:map/csv:save csv map when adding or changing an item X-Git-Tag: navit-0.5.0.5194svn~799 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d673801086e772660d17709392de1114ef306b50;p=profile%2Fivi%2Fnavit.git Fix:map/csv:save csv map when adding or changing an item git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4396 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/map/csv/csv.c b/navit/navit/map/csv/csv.c index df94fdf..efa42f1 100644 --- a/navit/navit/map/csv/csv.c +++ b/navit/navit/map/csv/csv.c @@ -139,6 +139,7 @@ save_map_csv(struct map_priv *m) rename(filename,m->filename); } g_free(filename); + m->dirty = 0; } } @@ -263,6 +264,8 @@ csv_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) g_free((struct attr*)attr_list->data); } attr_list->data = attr_new; + m->dirty = 1; + save_map_csv(m); return 1; default: g_free(attr_new); @@ -276,6 +279,8 @@ csv_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) //add new attribute curr_attr_list = g_list_prepend(curr_attr_list, attr_new); ((struct quadtree_data*)(((struct quadtree_item*)(mr->curr_item->data))->data))->attr_list = curr_attr_list; + m->dirty = 1; + save_map_csv(m); return 1; } g_free(attr_new); @@ -357,6 +362,8 @@ csv_coord_set(void *priv_data, struct coord *c, int count, enum change_mode mode quadtree_delete_item(m->tree_root, query_res); g_free(query_res); quadtree_add( m->tree_root, &insert_item); + m->dirty = 1; + save_map_csv(m); return 1; }