Browse Source

wxGUI/mapcalc: fix map name and function insertion event handling for wxPython 3 (merged from trunk, https://trac.osgeo.org/grass/changeset/59514)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@59515 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 years ago
parent
commit
f3f9154b8a
1 changed files with 2 additions and 2 deletions
  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)