Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Desenho.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-09-02 14:31:37 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-09-02 14:42:07 (GMT)
commit181c0a8dfc5fd434a978498840586e3d2b3637ba (patch)
tree5e2f3f06a679e3cecc07cb5b324a9cb32c57b40a /Desenho.py
parent583df7a03f81a73ae392a63575ef05b1dbe70c4b (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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Desenho.py b/Desenho.py
index 7c734b1..fd5aea4 100644
--- a/Desenho.py
+++ b/Desenho.py
@@ -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: