X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bc0c17afc3a83b625a6109375bf86a126cac69e..9fcbe0766385cc9f68c22da46d8081d02f8a4103:/wxPython/wx/lib/customtreectrl.py?ds=sidebyside diff --git a/wxPython/wx/lib/customtreectrl.py b/wxPython/wx/lib/customtreectrl.py index d987320ca0..7bfed72f48 100644 --- a/wxPython/wx/lib/customtreectrl.py +++ b/wxPython/wx/lib/customtreectrl.py @@ -4855,7 +4855,7 @@ class CustomTreeCtrl(wx.PyScrolledWindow): current = self.GetItemParent(current) if current: next = self.GetNextSibling(current) - if not self.IsEnabled(next): + if not next or not self.IsEnabled(next): next = None else: @@ -5130,7 +5130,7 @@ class CustomTreeCtrl(wx.PyScrolledWindow): underMouse = thisItem underMouseChanged = underMouse != self._underMouse - if underMouse and (flags & TREE_HITTEST_ONITEMBUTTON) and not event.LeftIsDown() and \ + if underMouse and (flags & TREE_HITTEST_ONITEM) and not event.LeftIsDown() and \ not self._isDragging and (not self._renameTimer or not self._renameTimer.IsRunning()): underMouse = underMouse else: