Another fix for: AttributeError: 'XML_Tree' object has no attribute 'itemColour'

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-04-29 00:05:34 +00:00
parent eb03e7fe93
commit 611d0e5cea

View File

@@ -1346,7 +1346,8 @@ class DropTarget(wx.PyDropTarget):
# Set color of highlighted item back to normal
if hl and hl.item:
if hl.item != parentItem:
g.tree.SetItemTextColour(hl.item, g.tree.itemColour)
if hasattr(g.tree, 'itemColour'):
g.tree.SetItemTextColour(hl.item, g.tree.itemColour)
# Highlight future parent
g.tree.itemColour = g.tree.GetItemTextColour(parentItem) # save current
g.testWin.highLightDT = updateHL(hl, HighLightDTBox, pos, size)