diff --git a/CHANGES.rst b/CHANGES.rst index 9a57c187..fa6c2d07 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -126,6 +126,9 @@ Changes in this release include the following: * Performance update for `wx.lib.agw.customtreectrl` (#1049) +* Ensure that colours set in wx.lib.agw.customtreectrl.TreeItemAttr are + instances of wx.Colour. (#1032) + * Fix drawing of ticks in wx.lib.agw.speedmeter when there are negative bounds values. (#1013) diff --git a/wx/lib/agw/customtreectrl.py b/wx/lib/agw/customtreectrl.py index 70a356fb..94f13b81 100644 --- a/wx/lib/agw/customtreectrl.py +++ b/wx/lib/agw/customtreectrl.py @@ -857,7 +857,7 @@ class TreeItemAttr(object): :param `colText`: an instance of :class:`wx.Colour`. """ - self._colText = colText + self._colText = wx.Colour(colText) def SetBackgroundColour(self, colBack): @@ -867,7 +867,7 @@ class TreeItemAttr(object): :param `colBack`: an instance of :class:`wx.Colour`. """ - self._colBack = colBack + self._colBack = wx.Colour(colBack) def SetBorderColour(self, colBorder): @@ -879,7 +879,7 @@ class TreeItemAttr(object): .. versionadded:: 0.9.6 """ - self._colBorder = colBorder + self._colBorder = wx.Colour(colBorder) def SetFont(self, font): diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py index ce008d11..7ce30988 100644 --- a/wx/lib/agw/hypertreelist.py +++ b/wx/lib/agw/hypertreelist.py @@ -2366,7 +2366,7 @@ class TreeListMainWindow(CustomTreeCtrl): # operations # ---------------------------------------------------------------------------- - def DoInsertItem(self, parent, previous, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None, separator=False): + def DoInsertItem(self, parent, previous, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None, *ignored_args): """ Actually inserts an item in the tree. @@ -2383,7 +2383,7 @@ class TreeListMainWindow(CustomTreeCtrl): use for the item in selected state; if `image` > -1 and `selImage` is -1, the same image is used for both selected and unselected items; :param `data`: associate the given Python object `data` with the item. - :param `separator`: unused at the moment, this parameter is present to comply with + :param `ignored_args`: unused at the moment, this parameter is present to comply with :meth:`CustomTreeCtrl.DoInsertItem() ` changed API. """