X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bbf7159c8211a398e573122c66b93722f5125c60..26ee3a06e28e16b71367183581a4f3b10ee4e832:/wxPython/samples/ide/activegrid/tool/OutlineService.py?ds=inline diff --git a/wxPython/samples/ide/activegrid/tool/OutlineService.py b/wxPython/samples/ide/activegrid/tool/OutlineService.py index 858fbade75..573327db89 100644 --- a/wxPython/samples/ide/activegrid/tool/OutlineService.py +++ b/wxPython/samples/ide/activegrid/tool/OutlineService.py @@ -84,6 +84,7 @@ class OutlineView(Service.ServiceView): item = self.GetControl().GetSelection() if item: self.GetControl().CallDoSelectCallback(item) + event.Skip() def ResumeActionOnSelect(self): @@ -156,11 +157,8 @@ class OutlineView(Service.ServiceView): treeCtrl.Expand(child) (child, cookie) = treeCtrl.GetNextChild(parentItem, cookie) - # wxBug: This causes a crash, tried using ScrollTo which crashed as well. Then tried calling it with wx.CallAfter and that crashed as well, with both EnsureVisible and ScrollTo - # self.GetControl().EnsureVisible(self.GetControl().GetRootItem()) - # So doing the following massive hack which forces the treectrl to scroll up to the top item - treeCtrl.Collapse(parentItem) - treeCtrl.Expand(parentItem) + if parentItem: + treeCtrl.EnsureVisible(parentItem) class OutlineTreeCtrl(wx.TreeCtrl):