dabo Commit
Revision 6002
Date: 2010-09-12 13:15:56 -0700 (Sun, 12 Sep 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6002

Changed:
U   trunk/dabo/ui/uiwx/dFormMixin.py

Log:
Added code to handle situations when drawing sizer outlines if a sizer has been 
deleted and its reference is now None.



Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2010-09-12 20:15:04 UTC (rev 6001)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2010-09-12 20:15:56 UTC (rev 6002)
@@ -232,8 +232,12 @@
        def __onIdle(self, evt):
                if self.__needOutlineRedraw or self._alwaysDrawSizerOutlines:
                        for sz in self.SizersToOutline:
-                               sz.drawOutline(self, 
recurse=self._recurseOutlinedSizers,
-                                               
drawChildren=self._drawSizerChildren)
+                               try:
+                                       sz.drawOutline(self, 
recurse=self._recurseOutlinedSizers,
+                                                       
drawChildren=self._drawSizerChildren)
+                               except AttributeError:
+                                       # Will happen if sz is None
+                                       self.removeFromOutlinedSizers(sz)
 
 
        def __onClose(self, evt):



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to