Skip to content

Commit

Permalink
fix #3882 (digitizing on Windows)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
petrasovaa committed Oct 27, 2019
1 parent 9e3eace commit f43825b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gui/wxpython/core/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ def OnRenderDone(self):
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:
Expand Down
3 changes: 2 additions & 1 deletion gui/wxpython/nviz/wxnviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def __del__(self):

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()
Expand Down
3 changes: 2 additions & 1 deletion gui/wxpython/vdigit/wxdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def __init__(self, device, deviceTmp, mapObj, window, glog, gprogress):
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)
Expand Down

0 comments on commit f43825b

Please sign in to comment.