From 8397c010eb16107d9309c9d3793ed95a2fa884b7 Mon Sep 17 00:00:00 2001 From: Benjamin Blacher Date: Sun, 20 Feb 2022 13:06:14 +0100 Subject: [PATCH] fix small bug when saving the map image Signed-off-by: Benjamin Blacher --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 190e99d..c1ac280 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,3 @@ -# TODO don't spawn a terminal window # TODO check screen res for map view # TODO allow zoom & pan on map view # TODO close all child windows on main window close @@ -95,9 +94,10 @@ def __init__(self): def save_map(self): savepath = QFileDialog.getSaveFileName(self, "Save Location", QDir.homePath(), "*.svg") path = savepath[0] - if not path[-4:] == ".svg": - path = path + ".svg" - copy(os.getcwd() + "/temp/map_tmp.svg", path) + if not path == "": + if not path[-4:] == ".svg": + path = path + ".svg" + copy(os.getcwd() + "/temp/map_tmp.svg", path) def map_satellite(self): context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery)