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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 26 20:57:27 PST 2014


Author: annakrat
Date: 2014-11-26 20:57:27 -0800 (Wed, 26 Nov 2014)
New Revision: 63173

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI/forms: fix updating dependent widgets with wxPython 3

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2014-11-26 23:22:46 UTC (rev 63172)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2014-11-27 04:57:27 UTC (rev 63173)
@@ -1216,11 +1216,15 @@
                         # A gselect.Select is a combobox with two children: a textctl and a popupwindow;
                         # we target the textctl here
                         textWin = selection.GetTextCtrl()
-                        p['wxId'] = [ textWin.GetId(), ]
-                        textWin.Bind(wx.EVT_TEXT, self.OnSetValue)
-                    
+                        if globalvar.CheckWxVersion([3]):
+                            p['wxId'] = [selection.GetId(), ]
+                        else:
+                            p['wxId'] = [textWin.GetId(), ]
+
                     if prompt == 'vector':
+                        # handlers should be bound in this order
                         selection.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
+                        selection.Bind(wx.EVT_TEXT, self.OnSetValue)
                         
                         # if formatSelector and p.get('age', 'old') == 'old':
                         #     # OGR supported (read-only)



More information about the grass-commit mailing list