Skip to content

Commit

Permalink
add a new item in the config: ruler_track_width
Browse files Browse the repository at this point in the history
  • Loading branch information
heldersepu committed Jul 13, 2014
1 parent 81390f8 commit 3140a70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gmapcatcher/mapConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def write(self):
config.set(SECTION_MAP, 'overlay_delay', self.overlay_delay)
config.set(SECTION_MAP, 'opacity', self.opacity)
config.set(SECTION_MAP, 'draw_track_start_end', self.draw_track_start_end)
config.set(SECTION_MAP, 'ruler_track_width', self.ruler_track_width)

config.add_section(SECTION_GPS)
config.set(SECTION_GPS, 'max_gps_zoom', self.max_gps_zoom)
Expand Down Expand Up @@ -192,6 +193,8 @@ def read_config(keyOption, defaultValue, castFunction, section=SECTION_INIT):
self.opacity = read_config('opacity', 0.0, float, SECTION_MAP)
## Initial map opacity
self.draw_track_start_end = read_config('draw_track_start_end', 0, int, SECTION_MAP)
## Ruler-track width, default is 3px
self.ruler_track_width = read_config('ruler_track_width', 3, int, SECTION_MAP)

## How often is the GPS updated, default is 1 second
self.gps_update_rate = read_config('gps_update_rate', 1.0, float, SECTION_GPS)
Expand Down
2 changes: 1 addition & 1 deletion gmapcatcher/widgets/widDrawingArea.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def draw_overlay(self, zl, conf, crossPixbuf, dlpixbuf,

# Draw the Ruler lines
if len(r_coord) >= 1:
self.draw_ruler_lines(conf.units, r_coord, zl, conf.gps_track_width)
self.draw_ruler_lines(conf.units, r_coord, zl, conf.ruler_track_width)

if showMarkers:
pixDim = marker.get_pixDim(zl)
Expand Down

0 comments on commit 3140a70

Please sign in to comment.