diff options
author | mascha@ma-scha.de <mascha@ma-scha.de@8f060a39-251c-0410-b1f3-431655927647> | 2008-07-15 20:22:37 (GMT) |
---|---|---|
committer | mascha@ma-scha.de <mascha@ma-scha.de@8f060a39-251c-0410-b1f3-431655927647> | 2008-07-15 20:22:37 (GMT) |
commit | 116e38a7514ea39fad483230bbc5f300578a9429 (patch) | |
tree | 9464541558d01ba22ef7501ffa5d594dcb527f1b /src/TextThought.py | |
parent | 9cbbbc96ac00af272b2986a90a0bc2ba855aec62 (diff) |
o fix issue 96 exception if text foreground color isn't set
git-svn-id: http://labyrinth.googlecode.com/svn/trunk@337 8f060a39-251c-0410-b1f3-431655927647
Diffstat (limited to 'src/TextThought.py')
-rw-r--r-- | src/TextThought.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/TextThought.py b/src/TextThought.py index 87fd5d3..6c5eb89 100644 --- a/src/TextThought.py +++ b/src/TextThought.py @@ -336,7 +336,10 @@ class TextThought (BaseThought.BaseThought): context.stroke () (textx, texty) = (self.text_location[0], self.text_location[1]) - r, g, b = utils.gtk_to_cairo_color(self.foreground_color) + if (self.foreground): + r, g, b = utils.gtk_to_cairo_color(self.foreground_color) + else: + r, g ,b = utils.gtk_to_cairo_color(utils.default_colors["fg"]) context.set_source_rgb (r, g, b) context.move_to (textx, texty) context.show_layout (self.layout) |