[GRASS-SVN] r61470 - grass/trunk/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 31 04:24:06 PDT 2014
Author: martinl
Date: 2014-07-31 04:24:06 -0700 (Thu, 31 Jul 2014)
New Revision: 61470
Modified:
grass/trunk/gui/wxpython/lmgr/datacatalog.py
Log:
wxGUI/LocationMapTree: add style parameter (see r61469)
Modified: grass/trunk/gui/wxpython/lmgr/datacatalog.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/datacatalog.py 2014-07-31 10:57:27 UTC (rev 61469)
+++ grass/trunk/gui/wxpython/lmgr/datacatalog.py 2014-07-31 11:24:06 UTC (rev 61470)
@@ -82,14 +82,9 @@
self.tree.ExpandCurrentLocation()
class LocationMapTree(wx.TreeCtrl):
- def __init__(self, parent, multiple=False):
+ def __init__(self, parent, style=wx.TR_HIDE_ROOT | wx.TR_EDIT_LABELS |
+ wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_COLUMN_LINES | wx.TR_SINGLE):
"""Location Map Tree constructor."""
- style = wx.TR_HIDE_ROOT | wx.TR_EDIT_LABELS | \
- wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_COLUMN_LINES
- if multiple:
- style |= wx.TR_MULTIPLE
- else:
- style |= wx.TR_SINGLE
super(LocationMapTree, self).__init__(parent, id=wx.ID_ANY, style=style)
self.showNotification = Signal('Tree.showNotification')
self.parent = parent
@@ -537,7 +532,9 @@
class TestTree(LocationMapTree):
def __init__(self, parent):
"""Test Tree constructor."""
- super(TestTree, self).__init__(parent, multiple=True)
+ super(TestTree, self).__init__(parent, style=wx.TR_HIDE_ROOT | wx.TR_EDIT_LABELS |
+ wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_COLUMN_LINES |
+ wx.TR_MULTIPLE)
def InitTreeItems(self):
"""Add locations, mapsets and layers to the tree."""
More information about the grass-commit
mailing list