tuikit/core/container.py
changeset 91 de80e140b0ec
parent 90 781774a8d568
child 92 b97c4e25ed6d
--- a/tuikit/core/container.py	Wed Mar 19 20:42:52 2014 +0100
+++ b/tuikit/core/container.py	Wed Mar 26 09:08:10 2014 +0100
@@ -24,9 +24,10 @@
     def draw(self, buffer, x=0, y=0):
         """Draw child widgets."""
         for child in self.children:
-            child.draw(buffer,
-                       x + child.x,
-                       y + child.y)
+            with buffer.clip(x, y, child.width, child.height):
+                child.draw(buffer,
+                           x + child.x,
+                           y + child.y)
 
     def set_theme(self, theme):
         Widget.set_theme(self, theme)