[GRASS-SVN] r64210 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 15 18:19:53 PST 2015


Author: annakrat
Date: 2015-01-15 18:19:52 -0800 (Thu, 15 Jan 2015)
New Revision: 64210

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI/gselect: fix g.remove in wxPython 3, Select widget behaves differently

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2015-01-15 22:10:29 UTC (rev 64209)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2015-01-16 02:19:52 UTC (rev 64210)
@@ -200,7 +200,10 @@
                 else:
                     etype = type_param.get('value')
 
-                self.data[win.GetParent().SetElementList] = {'type': etype}
+                if globalvar.CheckWxVersion([3]):
+                    self.data[win.SetElementList] = {'type': etype}
+                else:
+                    self.data[win.GetParent().SetElementList] = {'type': etype}
 
                 # t.(un)register has one type for 'input', 'maps'
                 maps_param = self.task.get_param('maps', element='name', raiseError=False)

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2015-01-15 22:10:29 UTC (rev 64209)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2015-01-16 02:19:52 UTC (rev 64210)
@@ -95,7 +95,11 @@
         :param validator: validator for TextCtrl
         """
         wx.combo.ComboCtrl.__init__(self, parent=parent, id=id, size=size, validator=validator)
-        self.GetChildren()[0].SetName("Select")
+        if globalvar.CheckWxVersion([3]):
+            self.SetName("Select")
+        else:
+            self.GetChildren()[0].SetName("Select")
+            
         self.GetChildren()[0].type = type
 
         self.tcp = TreeCtrlComboPopup()



More information about the grass-commit mailing list