Fix:Core:Cleaned up mapset handling
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 20 Mar 2009 17:36:15 +0000 (17:36 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 20 Mar 2009 17:36:15 +0000 (17:36 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2148 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/graphics.c
navit/graphics.h
navit/navit.c

index 35b4087..b28a113 100644 (file)
@@ -1717,6 +1717,7 @@ void graphics_displaylist_draw(struct graphics *gra, struct displaylist *display
        int order=transform_get_order(trans);
        struct point p;
        displaylist->dc.trans=trans;
+       displaylist->dc.gra=gra;
        p.x=0;
        p.y=0;
        // FIXME find a better place to set the background color
@@ -1741,7 +1742,7 @@ void graphics_displaylist_draw(struct graphics *gra, struct displaylist *display
  * @returns <>
  * @author Martin Schaller (04/2008)
 */
-void graphics_draw(struct graphics *gra, struct displaylist *displaylist, GList *mapsets, struct transformation *trans, struct layout *l, int async, struct callback *cb)
+void graphics_draw(struct graphics *gra, struct displaylist *displaylist, struct mapset *mapset, struct transformation *trans, struct layout *l, int async, struct callback *cb)
 {
        int order=transform_get_order(trans);
 
@@ -1755,8 +1756,7 @@ void graphics_draw(struct graphics *gra, struct displaylist *displaylist, GList
        dbg(1,"order=%d\n", order);
 
        displaylist->dc.gra=gra;
-       if(mapsets)
-               displaylist->ms=mapsets->data;
+       displaylist->ms=mapset;
        displaylist->dc.trans=trans;
        displaylist->workload=async ? 100 : 0;
        displaylist->cb=cb;
index 27b877b..a7793ba 100644 (file)
@@ -32,6 +32,7 @@ struct graphics_font;
 struct graphics_image;
 struct transformation;
 struct display_list;
+struct mapset;
 
 enum draw_mode_num {
        draw_mode_begin, draw_mode_end, draw_mode_cursor, draw_mode_end_lazy
@@ -159,7 +160,7 @@ int graphics_draw_drag(struct graphics *this_, struct point *p);
 void graphics_background_gc(struct graphics *this_, struct graphics_gc *gc);
 void graphics_draw_itemgra(struct graphics *gra, struct itemgra *itm, struct transformation *t);
 void graphics_displaylist_draw(struct graphics *gra, struct displaylist *displaylist, struct transformation *trans, struct layout *l, int callback);
-void graphics_draw(struct graphics *gra, struct displaylist *displaylist, GList *mapsets, struct transformation *trans, struct layout *l, int async, struct callback *cb);
+void graphics_draw(struct graphics *gra, struct displaylist *displaylist, struct mapset *mapset, struct transformation *trans, struct layout *l, int async, struct callback *cb);
 int graphics_draw_cancel(struct graphics *gra, struct displaylist *displaylist);
 struct displaylist_handle *graphics_displaylist_open(struct displaylist *displaylist);
 struct displayitem *graphics_displaylist_next(struct displaylist_handle *dlh);
index cbd7c32..d5cbe3c 100644 (file)
@@ -193,7 +193,7 @@ navit_draw_async(struct navit *this_, int async)
                navit_vehicle_draw(this_, nv, NULL);
                l=g_list_next(l);
        }
-       graphics_draw(this_->gra, this_->displaylist, this_->mapsets, this_->trans, this_->layout_current, async, NULL);
+       graphics_draw(this_->gra, this_->displaylist, this_->mapsets->data, this_->trans, this_->layout_current, async, NULL);
 }
 
 void