浏览代码

Fix save display to file for wxNVIZ so it saves real tif files as well as ppm files.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47342 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 13 年之前
父节点
当前提交
7e5731b823
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      gui/wxpython/gui_modules/mapdisp.py
  2. 1 1
      gui/wxpython/gui_modules/nviz_mapdisp.py

+ 2 - 2
gui/wxpython/gui_modules/mapdisp.py

@@ -1119,8 +1119,8 @@ class MapFrame(wx.Frame):
         """
         """
         if self.toolbars['nviz']:
         if self.toolbars['nviz']:
             filetype = "PPM file (*.ppm)|*.ppm|TIF file (*.tif)|*.tif"
             filetype = "PPM file (*.ppm)|*.ppm|TIF file (*.tif)|*.tif"
-            ltype = [{ 'ext' : 'ppm', 'type' : -1 },
-                     { 'ext' : 'tif', 'type' : wx.BITMAP_TYPE_TIF }]
+            ltype = [{ 'ext' : 'ppm', 'type' : 'ppm' },
+                     { 'ext' : 'tif', 'type' : 'tif' }]
         else:
         else:
             img = self.MapWindow.img
             img = self.MapWindow.img
             if not img:
             if not img:

+ 1 - 1
gui/wxpython/gui_modules/nviz_mapdisp.py

@@ -1924,7 +1924,7 @@ class GLWindow(MapWindow, glcanvas.GLCanvas):
         @param width image width
         @param width image width
         @param height image height
         @param height image height
         """
         """
-        self._display.SaveToFile(FileName, width, height)
+        self._display.SaveToFile(FileName, width, height, FileType)
                 
                 
         # pbuffer = wx.EmptyBitmap(max(1, self.Map.width), max(1, self.Map.height))
         # pbuffer = wx.EmptyBitmap(max(1, self.Map.width), max(1, self.Map.height))
         # dc = wx.BufferedPaintDC(self, pbuffer)
         # dc = wx.BufferedPaintDC(self, pbuffer)