Geography : I finaly catch this problem : autozoom the first time we click on the map.

svn: r19461
This commit is contained in:
Serge Noiraud 2012-05-07 12:17:02 +00:00
parent 17791c4b46
commit 3a1093edc4
2 changed files with 7 additions and 7 deletions

View File

@ -647,9 +647,9 @@ class GeoGraphyView(OsmGps, NavigationView):
config.get("geography.zoom") )
else:
self._autozoom()
self.end_selection = None
self.save_center(self.latit, self.longt)
config.set("geography.zoom", self.osm.props.zoom)
self.end_selection = None
def _get_father_and_mother_name(self, event):
"""

View File

@ -119,9 +119,9 @@ class LifeWayLayer(gobject.GObject, osmgpsmap.GpsMapLayer):
ctx.set_line_join(cairo.LINE_JOIN_ROUND)
ctx.set_line_width(3)
color = gtk.gdk.color_parse(lifeway[1])
ctx.set_source_rgba(color.red / 65535,
color.green / 65535,
color.blue / 65535,
ctx.set_source_rgba(color.red / 255,
color.green / 255,
color.blue / 255,
0.1) # transparency
ggc = drawable.new_gc()
rds = float(lifeway[2])
@ -163,9 +163,9 @@ class LifeWayLayer(gobject.GObject, osmgpsmap.GpsMapLayer):
coord_x, coord_y = gpsmap.convert_geographic_to_screen(conv_pt)
map_points.append((coord_x, coord_y))
color = gtk.gdk.color_parse(lifeway[1])
ctx.set_source_rgb(color.red / 65535,
color.green / 65535,
color.blue / 65535)
ctx.set_source_rgb(color.red / 255,
color.green / 255,
color.blue / 255)
first = True
for idx_pt in range(0, len(map_points)):
if first: