Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ep_modifier_flip.py
diff options
context:
space:
mode:
Diffstat (limited to 'ep_modifier_flip.py')
-rw-r--r--ep_modifier_flip.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/ep_modifier_flip.py b/ep_modifier_flip.py
index c377442..a6ffaf7 100644
--- a/ep_modifier_flip.py
+++ b/ep_modifier_flip.py
@@ -1,5 +1,5 @@
# coding: UTF-8
-# Copyright 2009 Thomas Jourdan
+# Copyright 2009, 2010 Thomas Jourdan
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -86,20 +86,19 @@ class FlipModifier(model_allele.Allele):
single_treenode.render(task, ctx, width, height)
ctx.restore()
- def explain(self):
- """
- post: len(__return__) == 3
- """
- if self.xFlip and self.yFlip:
- text = u'Flip modifier: flip horizontally and vertically.'
- elif self.xFlip:
- text = u'Flip modifier: flip horizontally.'
- elif self.yFlip:
- text = u'Flip modifier: flip vertically.'
+ def explain(self, task, formater, single_layer, single_treenode):
+ if self.xFlip < 0.0 and self.yFlip < 0.0:
+ text = _('Flip modifier: flip horizontally and vertically.')
+ elif self.xFlip < 0.0:
+ text = _('Flip modifier: flip horizontally.')
+ elif self.yFlip < 0.0:
+ text = _('Flip modifier: flip vertically.')
else:
- text = u'Flip modifier: did not flip.'
- return text, None, None
-
+ text = _('Flip modifier: did not flip.')
+ formater.text_item(text)
+ single_layer.explain(formater)
+ single_treenode.explain(task, formater)
+
def copy(self):
"""A copy constructor.
post: isinstance(__return__, FlipModifier)