diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-10-23 13:42:03 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-10-23 14:57:53 (GMT) |
commit | b11508e23aa072163228f4419cc97dfe2af0dd91 (patch) | |
tree | a2a35c19bd9446e6bf0f927a3e49718436489b51 /globos.py | |
parent | e02308729a1c071ff53bd16415d90117875193a2 (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.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |