浏览代码

wxGUI/mapcalc: fix map name and function insertion event handling for wxPython 3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59514 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年之前
父节点
当前提交
9fced595a6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gui/wxpython/modules/mcalc_builder.py

+ 2 - 2
gui/wxpython/modules/mcalc_builder.py

@@ -422,7 +422,7 @@ class MapCalcFrame(wx.Frame):
         """!Checks if user is typing or the event was emited by map selection.
         """!Checks if user is typing or the event was emited by map selection.
         Prevents from changing focus.
         Prevents from changing focus.
         """
         """
-        item = event.GetString()
+        item = self.mapselect.GetValue().strip()
         if not (abs(len(item) - len(self.lastMapName)) == 1  and \
         if not (abs(len(item) - len(self.lastMapName)) == 1  and \
             self.lastMapName in item or item in self.lastMapName):
             self.lastMapName in item or item in self.lastMapName):
             self.OnSelect(event)
             self.OnSelect(event)
@@ -435,7 +435,7 @@ class MapCalcFrame(wx.Frame):
         Checks for characters which can be in raster map name but 
         Checks for characters which can be in raster map name but 
         the raster map name must be then quoted.
         the raster map name must be then quoted.
         """
         """
-        item = event.GetString().strip()
+        item = self.FindWindowById(event.GetId()).GetValue().strip()
         if any((char in item) for char in self.charactersToQuote):
         if any((char in item) for char in self.charactersToQuote):
             item = '"' + item + '"'
             item = '"' + item + '"'
         self._addSomething(item)
         self._addSomething(item)