[GRASS-SVN] r32004 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 5 17:14:22 EDT 2008
Author: martinl
Date: 2008-07-05 17:14:22 -0400 (Sat, 05 Jul 2008)
New Revision: 32004
Modified:
grass/trunk/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: modules don't refresh the list of available maps, trac #218
Modified: grass/trunk/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gselect.py 2008-07-05 20:10:15 UTC (rev 32003)
+++ grass/trunk/gui/wxpython/gui_modules/gselect.py 2008-07-05 21:14:22 UTC (rev 32004)
@@ -40,7 +40,7 @@
self.SetPopupControl(self.tcp)
self.SetPopupExtents(0,100)
self.tcp.GetElementList(type, mapsets, exceptOf)
- self.tcp.SetMultiple(multiple)
+ self.tcp.SetData(type, mapsets, exceptOf, multiple)
def SetElementList(self, type):
self.tcp.seltree.DeleteAllItems()
@@ -57,6 +57,9 @@
self.value = [] # for multiple is False -> len(self.value) in [0,1]
self.curitem = None
self.multiple = False
+ self.type = None
+ self.mapsets = []
+ self.exceptOf = []
def Create(self, parent):
self.seltree = wx.TreeCtrl(parent, style=wx.TR_HIDE_ROOT
@@ -99,6 +102,10 @@
def OnPopup(self):
"""Limited only for first selected"""
+ # update list
+ self.seltree.DeleteAllItems()
+ self.GetElementList(self.type, self.mapsets, self.exceptOf)
+
if len(self.value) > 0:
self.seltree.EnsureVisible(self.value[0])
self.seltree.SelectItem(self.value[0])
@@ -253,9 +260,9 @@
evt.Skip()
- def SetMultiple(self, value):
+ def SetData(self, type, mapsets, exceptOf, multiple):
"""Select multiple items?"""
- self.multiple = value
-
-
-
+ self.type = type
+ self.mapsets = mapsets
+ self.exceptOf = exceptOf
+ self.multiple = multiple
More information about the grass-commit
mailing list