Browse Source

wxGUI: disable not available modules in menu (sync'ed with devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@31363 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 years ago
parent
commit
8a16d9f20f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      gui/wxpython/wxgui.py

+ 4 - 0
gui/wxpython/wxgui.py

@@ -270,6 +270,10 @@ class GMFrame(wx.Frame):
         
         self.menucmd[menuItem.GetId()] = gcmd
 
+        if len(gcmd) > 0 and \
+                gcmd not in globalvar.grassCmd['all']:
+            menuItem.Enable (False)
+
         rhandler = eval(handler)
 
         self.Bind(wx.EVT_MENU, rhandler, menuItem)