[GRASS-SVN] r45579 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 5 13:38:16 EST 2011


Author: martinl
Date: 2011-03-05 10:38:16 -0800 (Sat, 05 Mar 2011)
New Revision: 45579

Modified:
   grass/trunk/gui/wxpython/gui_modules/layertree.py
Log:
wxGUI: TR_ALIGN_WINDOWS requires wxPython 2.8.9.2+
(merge r45578 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-03-05 18:36:19 UTC (rev 45578)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-03-05 18:38:16 UTC (rev 45579)
@@ -67,7 +67,7 @@
                  id = wx.ID_ANY, style = wx.SUNKEN_BORDER,
                  ctstyle = CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT |
                  CT.TR_HIDE_ROOT | CT.TR_ROW_LINES | CT.TR_FULL_ROW_HIGHLIGHT |
-                 CT.TR_MULTIPLE | CT.TR_ALIGN_WINDOWS, **kwargs):
+                 CT.TR_MULTIPLE, **kwargs):
         
         if 'style' in kwargs:
             ctstyle |= kwargs['style']
@@ -94,6 +94,11 @@
         self.rerender = False                # layer change requires a rerendering if auto render
         self.reorder = False                 # layer change requires a reordering
         
+        try:
+            ctstyle |= CT.TR_ALIGN_WINDOWS
+        except AttributeError:
+            pass
+        
         if globalvar.hasAgw:
             super(LayerTree, self).__init__(parent, id, agwStyle = ctstyle, **kwargs)
         else:



More information about the grass-commit mailing list