Don't store the xo-color property on _IconBuffer, it will cause conflicts with stroke-color and fill-color.

This commit is contained in:
Tomeu Vizoso 2007-09-10 17:55:35 +02:00
parent d8878e7d74
commit ccb0aaaa28

View File

@ -78,8 +78,6 @@ class _IconBuffer(object):
_loader = _SVGLoader() _loader = _SVGLoader()
def __init__(self): def __init__(self):
self._xo_color = None
self.icon_name = None self.icon_name = None
self.file_name = None self.file_name = None
self.fill_color = None self.fill_color = None
@ -182,7 +180,10 @@ class _IconBuffer(object):
return info return info
def _get_xo_color(self): def _get_xo_color(self):
return self._xo_color if self.stroke_color and self.fill_color:
return XoColor('%s,%s' % (self.stroke_color, self.fill_color))
else:
return None
def _set_xo_color(self, xo_color): def _set_xo_color(self, xo_color):
if xo_color: if xo_color:
@ -192,8 +193,6 @@ class _IconBuffer(object):
self.stroke_color = None self.stroke_color = None
self.fill_color = None self.fill_color = None
self._xo_color = xo_color
def get_surface(self): def get_surface(self):
cache_key = self._get_cache_key() cache_key = self._get_cache_key()
if cache_key in self._surface_cache: if cache_key in self._surface_cache: