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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 18 05:34:48 PST 2012


Author: annakrat
Date: 2012-11-18 05:34:48 -0800 (Sun, 18 Nov 2012)
New Revision: 53893

Modified:
   grass/trunk/gui/wxpython/gui_core/ghelp.py
   grass/trunk/gui/wxpython/gui_core/menu.py
Log:
wxGUI/SearchModuleWindow: fix r53879

Modified: grass/trunk/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/ghelp.py	2012-11-18 13:19:42 UTC (rev 53892)
+++ grass/trunk/gui/wxpython/gui_core/ghelp.py	2012-11-18 13:34:48 UTC (rev 53893)
@@ -131,7 +131,8 @@
         if not text:
             self.modulesData.SetFilter()
             mList = self.modulesData.GetCommandItems()
-            self.searchChoice.SetItems(mList)
+            if self.showChoice:
+                self.searchChoice.SetItems(mList)
             if self.showTip:
                 self.searchTip.SetLabel(_("%d modules found") % len(mList))
             event.Skip()
@@ -140,8 +141,9 @@
         findIn = self.searchBy.GetClientData(self.searchBy.GetSelection())
         modules, nFound = self.modulesData.FindModules(text = text, findIn = findIn)
         self.modulesData.SetFilter(modules)
-        self.searchChoice.SetItems(self.modulesData.GetCommandItems())
-        self.searchChoice.SetSelection(0)
+        if self.showChoice:
+            self.searchChoice.SetItems(self.modulesData.GetCommandItems())
+            self.searchChoice.SetSelection(0)
         if self.showTip:
             self.searchTip.SetLabel(_("%d modules match") % nFound)
         

Modified: grass/trunk/gui/wxpython/gui_core/menu.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/menu.py	2012-11-18 13:19:42 UTC (rev 53892)
+++ grass/trunk/gui/wxpython/gui_core/menu.py	2012-11-18 13:34:48 UTC (rev 53893)
@@ -24,6 +24,7 @@
 
 from core              import globalvar
 from core              import utils
+from core.modulesdata  import ModulesData
 from core.gcmd         import EncodeString
 from core.settings     import UserSettings
 from gui_core.widgets  import ItemTree
@@ -140,7 +141,7 @@
 
         # search widget
         self.search = SearchModuleWindow(parent = self,
-                                         modulesData = menuData.GetModules(),
+                                         modulesData = ModulesData(menuData.GetModules()),
                                          showChoice = False)
         
         # buttons



More information about the grass-commit mailing list