Allow for None values in fill-color and stroke-color.

This commit is contained in:
Tomeu Vizoso 2007-08-26 20:21:49 +02:00
parent db02d6b54c
commit cf7ff39c5a

View File

@ -415,12 +415,12 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self.props.fill_color = value.get_fill_color()
self.props.stroke_color = value.get_stroke_color()
elif pspec.name == 'fill-color':
if not isinstance(value, basestring):
if not isinstance(value, basestring) and value is not None:
raise TypeError('fill-color must be a string, not %r' % type(value))
self._buffer.fill_color = value
self.emit_paint_needed(0, 0, -1, -1)
elif pspec.name == 'stroke-color':
if not isinstance(value, basestring):
if not isinstance(value, basestring) and value is not None:
raise TypeError('stroke-color must be a string, not %r' % type(value))
self._buffer.stroke_color = value
self.emit_paint_needed(0, 0, -1, -1)