diff --git a/CHANGES.rst b/CHANGES.rst index 7a6fe678..13282dee 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -113,12 +113,12 @@ Changes in this release include the following: * Fix rendering and mouse sensitivity in UltimateListCtrl when adding HyperText items. (#1010) - + * Added a parameter to lib.agw.CustomTreeCtrl.SetItemWindow(), to allow positioning the Window (a small image) on the left of text in a CustomTreeItem. (#PR886). -* Declared DeleteAllPages in the notebook subclasses, so the proper C++ +* Declared DeleteAllPages in the notebook subclasses, so the proper C++ implementation will be called. (#972) * Removed wx.lib.floatbar, which has been deprecated forever and probably @@ -135,7 +135,7 @@ Changes in this release include the following: * Fixed wx.ListCtrl.Append when wx.LC_SORT style is used, so appending items out of order does not lose the data for the remaining columns. (#906) - + * Add wx.Accessible, it's Windows-only, will raise a NotImplementedError exception on the other platforms. (#958) @@ -152,8 +152,8 @@ Changes in this release include the following: way. If you need to use some other encoding for some reason you can first convert the text to a bytesarray or other buffer protocol compatible object and then create the virtual file from that data. (#969) - +* Performance update for `wx.lib.agw.customtreectrl` (#1049) diff --git a/wx/lib/agw/customtreectrl.py b/wx/lib/agw/customtreectrl.py index 4ab4e01a..d5b8cd3b 100644 --- a/wx/lib/agw/customtreectrl.py +++ b/wx/lib/agw/customtreectrl.py @@ -3504,7 +3504,7 @@ class CustomTreeCtrl(wx.ScrolledWindow): :see: The :meth:`~CustomTreeCtrl.__init__` method for the `flag` parameter description. """ - return self._agwStyle & flag + return bool(self._agwStyle & flag) def SetAGWWindowStyleFlag(self, agwStyle): diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py index 2c3bd0b2..ce008d11 100644 --- a/wx/lib/agw/hypertreelist.py +++ b/wx/lib/agw/hypertreelist.py @@ -3104,7 +3104,7 @@ class TreeListMainWindow(CustomTreeCtrl): # horizontal lines between rows? draw_row_lines = self.HasAGWFlag(TR_ROW_LINES) - if self.IsExposed(exposed_x, exposed_y, _MAX_WIDTH, h + draw_row_lines): + if self.IsExposed(exposed_x, exposed_y, _MAX_WIDTH, h + int(draw_row_lines)): if draw_row_lines: total_width = self._owner.GetHeaderWindow().GetWidth() # if the background colour is white, choose a @@ -4365,7 +4365,7 @@ class HyperTreeList(wx.Control): """ agwStyle = self.GetAGWWindowStyleFlag() - res = (agwStyle & flag and [True] or [False])[0] + res = bool(agwStyle & flag) return res