Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-07-05 09:41:15 (GMT)
committer Marion <marion.zepf@gmail.com>2013-07-05 09:41:15 (GMT)
commitb82a48a9b11ec53c3a2278dab88f710b7c1a5611 (patch)
tree3b4d32bdd9f8eafd4221516770e12144c23c81ea
parent20795e5eb541fc5737b0f86b9328348416c227fd (diff)
parent8e463c960037c395d5f8368e26e28e0b54c5565e (diff)
Merge branch 'turtle-centric-2' of git://git.sugarlabs.org/turtleart/mainline
-rw-r--r--TurtleArt/tabasics.py8
-rw-r--r--TurtleArt/taturtle.py3
2 files changed, 6 insertions, 5 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index fb2a186..04a74d1 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -390,7 +390,7 @@ in place of a number block)'),
self.tw.lc.def_prim(
'color',
0,
- lambda self: self.tw.turtles.get_active_turtle().get_color)
+ lambda self: self.tw.turtles.get_active_turtle().get_color())
palette.add_block('shade',
style='box-style',
@@ -402,7 +402,7 @@ in place of a number block)'),
self.tw.lc.def_prim(
'shade',
0,
- lambda self: self.tw.turtles.get_active_turtle().get_shade)
+ lambda self: self.tw.turtles.get_active_turtle().get_shade())
palette.add_block('gray',
style='box-style',
@@ -412,7 +412,7 @@ used in place of a number block)'),
value_block=True,
prim_name='gray')
self.tw.lc.def_prim('gray', 0, lambda self:
- self.tw.turtles.get_active_turtle().get_gray)
+ self.tw.turtles.get_active_turtle().get_gray())
palette.add_block('penup',
style='basic-style-extended-vertical',
@@ -486,7 +486,7 @@ in place of a number block)'),
self.tw.lc.def_prim(
'pensize',
0,
- lambda self: self.tw.turtles.get_active_turtle().get_pen_size)
+ lambda self: self.tw.turtles.get_active_turtle().get_pen_size())
define_logo_function('tapensize', 'to tapensize\noutput first round \
pensize\nend\n')
diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py
index 030d58d..a22cab6 100644
--- a/TurtleArt/taturtle.py
+++ b/TurtleArt/taturtle.py
@@ -27,7 +27,6 @@ import cairo
from random import uniform
from math import sin, cos, pi, sqrt
-
from taconstants import (TURTLE_LAYER, DEFAULT_TURTLE_COLORS, DEFAULT_TURTLE,
COLORDICT)
from tasprite_factory import SVG, svg_str_to_pixbuf
@@ -351,6 +350,8 @@ class Turtle:
color = COLORDICT[color][0]
else:
color = self._pen_color
+ elif color is None:
+ color = self._pen_color
try:
self._pen_color = color