Skip to content

Commit

Permalink
expand nodes of tree on update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdittrich committed Jul 14, 2017
1 parent 78a6246 commit 45e623b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pythonpath/ui_logic/qdaTreePanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def convertAbstractToUiTree(abstractTree,parent,gui_treemodel):
self.TreeControl1.SelectionType = SINGLE
self.TreeControl1.RootDisplayed = False

expandAllNodesGuiTree(treeControl.Model.DataModel.Root, treeControl)
# --------- helpers ---------------------

def messageBox(self, MsgText, MsgTitle, MsgType=MESSAGEBOX, MsgButtons=BUTTONS_OK):
Expand All @@ -134,6 +135,7 @@ def messageBox(self, MsgText, MsgTitle, MsgType=MESSAGEBOX, MsgButtons=BUTTONS_O
def showDialog(self):
self.DialogContainer.setVisible(True)
self.DialogContainer.createPeer(self.Toolkit, None)
self.updateTree() # can now execute the update (and within expand the nodes) since the peer is set now, and this is needed for expanding nodes (whyever...)
self.DialogContainer.execute()

# -----------------------------------------------------------
Expand Down Expand Up @@ -284,6 +286,8 @@ def expandAllNodesGuiTree(root,treeControl):
GETS: XTreeNode
RETURNS: Nothing, side effect
'''

# TODO: check if tree control has a peer, if not return None
for count in range(0,root.ChildCount):
child = root.getChildAt(count)

Expand Down

0 comments on commit 45e623b

Please sign in to comment.