Collapse all children when collapsing market group

This commit is contained in:
DarkPhoenix
2019-04-30 17:37:16 +03:00
parent 36c17dde8d
commit 33883c562a

View File

@@ -37,6 +37,7 @@ class MarketTree(wx.TreeCtrl):
# Bind our lookup method to when the tree gets expanded
self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.expandLookup)
self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnCollapsed)
def addImage(self, iconFile, location="icons"):
if iconFile is None:
@@ -71,6 +72,10 @@ class MarketTree(wx.TreeCtrl):
self.SortChildren(root)
def OnCollapsed(self, event):
self.CollapseAllChildren(event.Item)
event.Skip()
def jump(self, item):
"""Open market group and meta tab of given item"""
sMkt = self.sMkt