mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Added setAsTarget attrib
This commit is contained in:
parent
50b9e51aa6
commit
8bed6e9122
@ -53,7 +53,8 @@ class TreeNode:
|
|||||||
self._popupMenu = None
|
self._popupMenu = None
|
||||||
self.fSortChildren = False # [gjeon] flag for sorting children or not
|
self.fSortChildren = False # [gjeon] flag for sorting children or not
|
||||||
self.fModeChildrenTag = 0 # [gjeon] flag for using filter or not
|
self.fModeChildrenTag = 0 # [gjeon] flag for using filter or not
|
||||||
self.childrenTag = None # [gjeon] filter dictionary for
|
self.childrenTag = None # [gjeon] filter dictionary for
|
||||||
|
self.setAsTarget = 0 # [gjeon] to visualize reparent target
|
||||||
|
|
||||||
# [gjeon] to set fSortChildren
|
# [gjeon] to set fSortChildren
|
||||||
def setFSortChildren(self, fSortChildren):
|
def setFSortChildren(self, fSortChildren):
|
||||||
@ -154,8 +155,8 @@ class TreeNode:
|
|||||||
elif (command == 'Collapse All'):
|
elif (command == 'Collapse All'):
|
||||||
self.updateAll(0)
|
self.updateAll(0)
|
||||||
else:
|
else:
|
||||||
self.item.MenuCommand(command)
|
skipUpdate = self.item.MenuCommand(command)
|
||||||
if self.parent and (command != 'Update Explorer'):
|
if not skipUpdate and self.parent and (command != 'Update Explorer'):
|
||||||
# Update parent to try to keep explorer up to date
|
# Update parent to try to keep explorer up to date
|
||||||
self.parent.update()
|
self.parent.update()
|
||||||
|
|
||||||
@ -381,6 +382,8 @@ class TreeNode:
|
|||||||
self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
|
self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
|
||||||
if self.selected:
|
if self.selected:
|
||||||
self.label.configure(fg="white", bg="darkblue")
|
self.label.configure(fg="white", bg="darkblue")
|
||||||
|
elif self.setAsTarget:
|
||||||
|
self.label.configure(fg="white", bg="red")
|
||||||
else:
|
else:
|
||||||
fg = self.item.GetTextFg()
|
fg = self.item.GetTextFg()
|
||||||
self.label.configure(fg=fg, bg="white")
|
self.label.configure(fg=fg, bg="white")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user