Explorar el Código

fix #3882 (digitizing on Windows)

* g.pnmcomp needs to use the same size as the individually rendered maps

* do not call setlocale from windows to avoid assertion error under non-english locale, not clear why it impacts Windows only and if removing the line won't cause further problems
Anna Petrasova hace 5 años
padre
commit
b60f4280da

+ 2 - 2
gui/wxpython/core/render.py

@@ -639,8 +639,8 @@ class RenderMapMgr(wx.EvtHandler):
                                   mask='%s' % ",".join(masks),
                                   opacity='%s' % ",".join(opacities),
                                   bgcolor=bgcolor,
-                                  width=self.Map.width,
-                                  height=self.Map.height,
+                                  width=self._env['GRASS_RENDER_WIDTH'],
+                                  height=self._env['GRASS_RENDER_HEIGHT'],
                                   output=self.Map.mapfile,
                                   env=self._env)
             if ret != 0:

+ 2 - 1
gui/wxpython/nviz/wxnviz.py

@@ -141,7 +141,8 @@ class Nviz(object):
 
     def Init(self):
         """Initialize window"""
-        locale.setlocale(locale.LC_NUMERIC, 'C')
+        if sys.platform != 'win32':
+            locale.setlocale(locale.LC_NUMERIC, 'C')
         G_unset_window()
         Rast_unset_window()
         Rast__init_window()

+ 2 - 1
gui/wxpython/vdigit/wxdisplay.py

@@ -109,7 +109,8 @@ class DisplayDriver:
         progress = gprogress
 
         G_gisinit('wxvdigit')
-        locale.setlocale(locale.LC_NUMERIC, 'C')
+        if sys.platform != 'win32':
+            locale.setlocale(locale.LC_NUMERIC, 'C')
         G_set_error_routine(errfunc)
         G_set_percent_routine(perfunc)
         # G_set_fatal_error(FATAL_RETURN)