Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/globos.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-10-23 13:42:03 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-10-23 14:57:53 (GMT)
commitb11508e23aa072163228f4419cc97dfe2af0dd91 (patch)
treea2a35c19bd9446e6bf0f927a3e49718436489b51 /globos.py
parente02308729a1c071ff53bd16415d90117875193a2 (diff)
Avoid changing edition_mode in a globe if not needed
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'globos.py')
-rw-r--r--globos.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/globos.py b/globos.py
index 938b3f3..c54ce8d 100644
--- a/globos.py
+++ b/globos.py
@@ -70,9 +70,12 @@ class Globo:
font_name)
def set_selected(self, selected):
- logging.debug('Set selected %s', selected)
+ logging.debug('Set selected %s (%s)', selected, self.texto.text)
self.selec = selected
if self.texto is not None:
+ if selected and self.texto.get_edition_mode():
+ # if already is in edit mode, do nothing
+ return
self.texto.set_edition_mode(selected)
def imprimir(self, context):
@@ -856,6 +859,9 @@ class CuadroTexto:
if parse:
self._parse_font_description()
+ def get_edition_mode(self):
+ return self._in_edition
+
def set_edition_mode(self, in_edition):
if self._in_edition == in_edition:
return