[GRASS-SVN] r64229 - grass/branches/releasebranch_7_0/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 17 07:15:32 PST 2015
Author: annakrat
Date: 2015-01-17 07:15:32 -0800 (Sat, 17 Jan 2015)
New Revision: 64229
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
Log:
wxGUI/gselect: fix g.remove in wxPython 3, Select widget behaves differently (merge from trunk, r64210)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py 2015-01-17 13:39:46 UTC (rev 64228)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py 2015-01-17 15:15:32 UTC (rev 64229)
@@ -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/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py 2015-01-17 13:39:46 UTC (rev 64228)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py 2015-01-17 15:15:32 UTC (rev 64229)
@@ -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