Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@sugarlabs.org>2010-10-21 20:31:30 (GMT)
committer Gonzalo Odiard <godiard@sugarlabs.org>2010-10-21 20:31:30 (GMT)
commitc8ddf32147fb582850f64e8da87cc3d4a2f4193d (patch)
treede12e3761b24b47846ee08d8a1d6d14288d751a8 /Area.py
parentb70f9f14b569660ae358f6e2d91aee17852f3052 (diff)
Changes made to save the last added text item. (OLPC #5917)
Condition added to save the text when added at last in the paint activity so that it does not disappear. Text disappeared when added at last in the paint activity. Co-authored-by: Anubhav Aggarwal<anubhav@seeta.in>, Ishan Bansal <ishan@seeta.in>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Area.py b/Area.py
index 8843406..ba06758 100644
--- a/Area.py
+++ b/Area.py
@@ -165,7 +165,7 @@ class Area(gtk.DrawingArea):
self.pixmap_sel = None
self.desenho = []
self.textos = []
- self.estadoTexto = 0
+ self.text_in_progress = False
self.janela = janela
self.d = Desenho(self)
self.line_size = 2
@@ -325,7 +325,7 @@ class Area(gtk.DrawingArea):
self.d.text(widget, event)
# This fixes a bug that made the text viewer get stuck in the canvas
- elif self.estadoTexto is 1:
+ elif self.text_in_progress:
try:
# This works for a gtk.Entry
text = self.janela.textview.get_text()
@@ -337,7 +337,7 @@ class Area(gtk.DrawingArea):
if text is not None:
self.d.text(widget, event)
- self.estadoTexto = 0
+ self.text_in_progress = False
self.janela.textview.hide()
self.oldx, self.oldy = coords