[GRASS-SVN] r70985 - in grass/trunk/gui/wxpython: gui_core mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 29 11:12:28 PDT 2017


Author: annakrat
Date: 2017-04-29 11:12:28 -0700 (Sat, 29 Apr 2017)
New Revision: 70985

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: fix encoding problems, see #3340

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2017-04-29 07:59:28 UTC (rev 70984)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2017-04-29 18:12:28 UTC (rev 70985)
@@ -1310,7 +1310,7 @@
                     value = self._getValue(p)
                     if value:
                         # parameter previously set
-                        win.SetValue(str(value))
+                        win.SetValue(value if p.get('type', 'string') == 'string' else str(value))
 
                     win.Bind(wx.EVT_TEXT, self.OnSetValue)
                     style = wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2017-04-29 07:59:28 UTC (rev 70984)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2017-04-29 18:12:28 UTC (rev 70985)
@@ -238,7 +238,7 @@
         #
         self.Map.GetRenderMgr().updateProgress.connect(self.statusbarManager.SetProgress)
         self.Map.GetRenderMgr().renderingFailed.connect(lambda cmd, error: self._giface.WriteError(
-            _("Failed to run command '{command}'. Details:\n{error}").format(command=' '.join(cmd), error=error)))
+            _("Failed to run command '%(command)s'. Details:\n%(error)s") % dict(command=' '.join(cmd), error=error)))
 
     def GetMapWindow(self):
         return self.MapWindow



More information about the grass-commit mailing list