moved setting itemColour to XML_Tree.Clean where it belongs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -582,6 +582,7 @@ class XML_Tree(wx.TreeCtrl):
|
|||||||
self.rootObj = xxxMainNode(self.dom)
|
self.rootObj = xxxMainNode(self.dom)
|
||||||
self.root = self.AddRoot('XML tree', self.rootImage,
|
self.root = self.AddRoot('XML tree', self.rootImage,
|
||||||
data=wx.TreeItemData(self.rootObj))
|
data=wx.TreeItemData(self.rootObj))
|
||||||
|
self.itemColour = self.GetItemTextColour(self.root)
|
||||||
self.SetItemHasChildren(self.root)
|
self.SetItemHasChildren(self.root)
|
||||||
self.testElem = self.dom.createElement('dummy')
|
self.testElem = self.dom.createElement('dummy')
|
||||||
self.mainNode.appendChild(self.testElem)
|
self.mainNode.appendChild(self.testElem)
|
||||||
@@ -601,7 +602,6 @@ class XML_Tree(wx.TreeCtrl):
|
|||||||
self.rootObj = xxxMainNode(self.dom)
|
self.rootObj = xxxMainNode(self.dom)
|
||||||
self.root = self.AddRoot('XML tree', self.rootImage,
|
self.root = self.AddRoot('XML tree', self.rootImage,
|
||||||
data=wx.TreeItemData(self.rootObj))
|
data=wx.TreeItemData(self.rootObj))
|
||||||
self.itemColour = self.GetItemTextColour(self.root)
|
|
||||||
self.SetItemHasChildren(self.root)
|
self.SetItemHasChildren(self.root)
|
||||||
nodes = self.mainNode.childNodes[:]
|
nodes = self.mainNode.childNodes[:]
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
@@ -1346,7 +1346,6 @@ class DropTarget(wx.PyDropTarget):
|
|||||||
# Set color of highlighted item back to normal
|
# Set color of highlighted item back to normal
|
||||||
if hl and hl.item:
|
if hl and hl.item:
|
||||||
if hl.item != parentItem:
|
if hl.item != parentItem:
|
||||||
if hasattr(g.tree, 'itemColour'):
|
|
||||||
g.tree.SetItemTextColour(hl.item, g.tree.itemColour)
|
g.tree.SetItemTextColour(hl.item, g.tree.itemColour)
|
||||||
# Highlight future parent
|
# Highlight future parent
|
||||||
g.tree.itemColour = g.tree.GetItemTextColour(parentItem) # save current
|
g.tree.itemColour = g.tree.GetItemTextColour(parentItem) # save current
|
||||||
|
Reference in New Issue
Block a user