changeset 615:e71e13dbd570

Properly copy pos when creating parts of speech bubbles.
author Simon Cross <hodgestar@gmail.com>
date Wed, 04 May 2011 01:28:41 +0200
parents bc793415259c
children 37c1d9958c54
files skaapsteker/widgets/bubble.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/widgets/bubble.py	Sun Apr 24 20:46:06 2011 +0200
+++ b/skaapsteker/widgets/bubble.py	Wed May 04 01:28:41 2011 +0200
@@ -54,8 +54,8 @@
         pos = pygame.Rect((0, 0), (300, 1))
         state = self.dsm.get_state()
         if state.text:
-            pos = pos.move(0, 0) # copy
-            self._text = Text(state.text, pos, wrap=True)
+            # pos.move(0, 0) copies pos
+            self._text = Text(state.text, pos.move(0, 0), wrap=True)
         else:
             self._text = None
         options = [(text, i) for (i, text) in self.dsm.choices()]
@@ -64,8 +64,8 @@
             options.append((text, "N"))
         else:
             options.append(("Leave", "L"))
-        pos = pos.move(0, 0) # copy
-        self._text_choice = TextChoice(options, pos, wrap=True)
+        # pos.move(0, 0) copies pos
+        self._text_choice = TextChoice(options, pos.move(0, 0), wrap=True)
         self._text_choice.callbacks.append(self._selected)
 
     def _selected(self, i, data):