Procházet zdrojové kódy

wxGUI: fix encoding problems, see https://trac.osgeo.org/grass/ticket/3340

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70985 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová před 8 roky
rodič
revize
fbe5df3f77
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      gui/wxpython/gui_core/forms.py
  2. 1 1
      gui/wxpython/mapdisp/frame.py

+ 1 - 1
gui/wxpython/gui_core/forms.py

@@ -1310,7 +1310,7 @@ class CmdPanel(wx.Panel):
                     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

+ 1 - 1
gui/wxpython/mapdisp/frame.py

@@ -238,7 +238,7 @@ class MapFrame(SingleMapFrame):
         #
         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