Merge pull request #1058 from RobinD42/fix-issue1032

Ensure colours set in TreeItemAttr are instances of wx.Colour
This commit is contained in:
Robin Dunn
2018-10-26 18:14:28 -07:00
committed by GitHub
3 changed files with 8 additions and 5 deletions

View File

@@ -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)

View File

@@ -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):

View File

@@ -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() <lib.agw.customtreectrl.CustomTreeCtrl.DoInsertItem>` changed API.
"""