diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-09-02 14:31:37 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-09-02 14:42:07 (GMT) |
commit | 181c0a8dfc5fd434a978498840586e3d2b3637ba (patch) | |
tree | 5e2f3f06a679e3cecc07cb5b324a9cb32c57b40a /Desenho.py | |
parent | 583df7a03f81a73ae392a63575ef05b1dbe70c4b (diff) |
Save and restore tools state in the metadata - SL #2708
Signed-off-by: Puneet Kaur <puneet.gkaur@gmail.com>
Acked-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'Desenho.py')
-rw-r--r-- | Desenho.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -212,6 +212,7 @@ class Desenho: widget.desenha = False size = widget.tool['line size'] shape = widget.tool['line shape'] + if shape == 'circle': if last: widget.drawing_ctx.set_line_width(size) @@ -226,6 +227,9 @@ class Desenho: coords[1]) widget.drawing_ctx.arc(coords[0], coords[1], size / 2, 0., 2 * math.pi) + # when activity starts with rainbow tool, need this to + # not paint the background + widget.drawing_ctx.set_source_rgba(1.0, 1.0, 1.0, 0.0) widget.drawing_ctx.fill() elif shape == 'square': @@ -249,6 +253,9 @@ class Desenho: coords[1] - size / 2) widget.drawing_ctx.rectangle(coords[0] - size / 2, coords[1] - size / 2, size, size) + # when activity starts with rainbow tool, need this to + # not paint the background + widget.drawing_ctx.set_source_rgba(1.0, 1.0, 1.0, 0.0) widget.drawing_ctx.fill() if last: |