Browse Source

wxGUI: cosmetics in DMonMap (self.mapfile has already extension defined)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63429 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 years ago
parent
commit
5b6ab196cb
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'
             self.maskfileCmd = os.path.splitext(mapfile)[0] + '.pgm'
 
 
         # generated file for g.pnmcomp output for rendering the map
         # 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
         # signal sent when d.out.file/d.to.rast appears in cmd file, attribute is cmd
         self.saveToFile = Signal('DMonMap.saveToFile')
         self.saveToFile = Signal('DMonMap.saveToFile')
         self.dToRast = Signal('DMonMap.dToRast')
         self.dToRast = Signal('DMonMap.dToRast')