Skip to content

Commit

Permalink
Geography: Use path from constants
Browse files Browse the repository at this point in the history
  • Loading branch information
André Apitzsch committed Mar 9, 2022
1 parent 45f4b71 commit 98e3d07
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gramps/plugins/lib/maps/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
#
# -------------------------------------------------------------------------
_ = glocale.translation.sgettext
GEOGRAPHY_PATH = os.path.join(HOME_DIR, "maps")

# -------------------------------------------------------------------------
#
Expand Down Expand Up @@ -115,7 +114,7 @@ class GeoGraphyView(OsmGps, NavigationView):
"""
# settings in the config file
CONFIGSETTINGS = (
('geography.path', GEOGRAPHY_PATH),
('geography.path', constants.GEOGRAPHY_PATH),

('geography.zoom', 10),
('geography.zoom_when_center', 12),
Expand Down Expand Up @@ -146,7 +145,7 @@ def __init__(self, title, pdata, dbstate, uistate,
self.lock = config.get("geography.lock")
tile_path = config.get('geography.path')
if tile_path == "":
config.set('geography.path', GEOGRAPHY_PATH)
config.set('geography.path', constants.GEOGRAPHY_PATH)
else:
# verify is the path always exists
if os.path.exists(tile_path) and os.path.isdir(tile_path):
Expand Down Expand Up @@ -1362,7 +1361,7 @@ def set_tilepath(self, *obj):
if self.path_entry.get_text().strip():
config.set('geography.path', self.path_entry.get_text())
else:
config.set('geography.path', GEOGRAPHY_PATH)
config.set('geography.path', constants.GEOGRAPHY_PATH)

def select_tilepath(self, *obj):
"""
Expand Down

0 comments on commit 98e3d07

Please sign in to comment.