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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 6 12:58:49 PDT 2014


Author: annakrat
Date: 2014-08-06 12:58:49 -0700 (Wed, 06 Aug 2014)
New Revision: 61554

Modified:
   grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
wxGUI/search: fix finding next match on Mac - workaround for Enter resulting in EVT_TEXT

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2014-08-06 19:15:24 UTC (rev 61553)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2014-08-06 19:58:49 UTC (rev 61554)
@@ -898,6 +898,7 @@
         self._results = [] # list of found nodes
         self._resultIndex = -1
         self._searchKeys = ['description', 'keywords', 'command']
+        self._oldValue = ''
         
         self.moduleSelected = Signal('SearchModuleWidget.moduleSelected')
         self.showSearchResult = Signal('SearchModuleWidget.showSearchResult')
@@ -968,6 +969,11 @@
     def OnSearchModule(self, event):
         """Search module by keywords or description"""
         value = self._search.GetValue()
+        if value == self._oldValue:
+            event.Skip()
+            return
+        self._oldValue = value
+
         if len(value) <= 2:
             if len(value) == 0: # reset
                 commands = self._searchModule(keys=['command'], value='')



More information about the grass-commit mailing list