Browse Source

wxGUI: cosmetics in DMonMap (self.mapfile has already extension defined)
(merge https://trac.osgeo.org/grass/changeset/63429 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63430 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 years ago
parent
commit
38ded8fda5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gui/wxpython/mapdisp/main.py

+ 4 - 1
gui/wxpython/mapdisp/main.py

@@ -79,7 +79,10 @@ class DMonMap(Map):
             self.maskfileCmd = os.path.splitext(mapfile)[0] + '.pgm'
 
         # generated file for g.pnmcomp output for rendering the map
-        self.mapfile = monFile['map'] + '.ppm'
+        self.mapfile = monFile['map']
+        if os.path.splitext(self.mapfile)[1] != '.ppm':
+            self.mapfile += '.ppm'
+        
         # signal sent when d.out.file/d.to.rast appears in cmd file, attribute is cmd
         self.saveToFile = Signal('DMonMap.saveToFile')
         self.dToRast = Signal('DMonMap.dToRast')