Forráskód Böngészése

wxGUI: TR_ALIGN_WINDOWS requires wxPython 2.8.9.2+
(merge https://trac.osgeo.org/grass/changeset/45578 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45579 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 14 éve
szülő
commit
4a631ba61c
1 módosított fájl, 6 hozzáadás és 1 törlés
  1. 6 1
      gui/wxpython/gui_modules/layertree.py

+ 6 - 1
gui/wxpython/gui_modules/layertree.py

@@ -67,7 +67,7 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
                  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 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
         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: