switch (event->button) {
case 1:
if (event->type==GDK_2BUTTON_PRESS) {
- map_set_zoom(_zoom - 1);
+ map_center_unit(x2unit((gint) (event->x + 0.5)), y2unit((gint) (event->y + 0.5)));
return FALSE;
}
if (event->type==GDK_3BUTTON_PRESS)
return FALSE;
+ map_drag_start(event->x, event->y);
break;
case 2:
- map_drag_start(event->x, event->y);
+ map_set_zoom(_zoom - 1);
break;
case 3:
#ifndef WITH_HILDON
case MAP_MODE_SET_ROUTE_TO:
break;
default:
+ map_drag_stop(event->x, event->y);
+ map_render_data();
break;
}
- g_idle_add((GSourceFunc)map_update_location_from_center, NULL);
- map_center_unit(x2unit((gint) (event->x + 0.5)), y2unit((gint) (event->y + 0.5)));
+ g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL);
break;
case 2:
- map_drag_stop(event->x, event->y);
- map_render_data();
+ /* */
break;
case 3:
break;