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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 27 06:38:33 PST 2014


Author: annakrat
Date: 2014-11-27 06:38:33 -0800 (Thu, 27 Nov 2014)
New Revision: 63199

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI/forms: fix commit r63173

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2014-11-27 14:36:37 UTC (rev 63198)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2014-11-27 14:38:33 UTC (rev 63199)
@@ -1220,12 +1220,16 @@
                             p['wxId'] = [selection.GetId(), ]
                         else:
                             p['wxId'] = [textWin.GetId(), ]
+                        if prompt != 'vector':
+                            self.FindWindowById(p['wxId'][0]).Bind(wx.EVT_TEXT, self.OnSetValue)
 
                     if prompt == 'vector':
+                        win = self.FindWindowById(p['wxId'][0])
                         # handlers should be bound in this order
-                        selection.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
-                        selection.Bind(wx.EVT_TEXT, self.OnSetValue)
-                        
+                        # OnUpdateSelection depends on calling OnSetValue first which is bad
+                        win.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
+                        win.Bind(wx.EVT_TEXT, self.OnSetValue)
+
                         # if formatSelector and p.get('age', 'old') == 'old':
                         #     # OGR supported (read-only)
                         #     self.hsizer = wx.BoxSizer(wx.HORIZONTAL)



More information about the grass-commit mailing list