dabo Commit
Revision 3141
Date: 2007-05-27 08:22:29 -0700 (Sun, 27 May 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3141
Changed:
U trunk/dabo/ui/uiwx/dImage.py
Log:
Fixed some performance issues in which _showPic() was being called multiple
times for a single change.
Diff:
Modified: trunk/dabo/ui/uiwx/dImage.py
===================================================================
--- trunk/dabo/ui/uiwx/dImage.py 2007-05-27 15:20:08 UTC (rev 3140)
+++ trunk/dabo/ui/uiwx/dImage.py 2007-05-27 15:22:29 UTC (rev 3141)
@@ -45,7 +45,8 @@
def _onResize(self, evt):
- self._showPic()
+ if not self._inShowPic:
+ self._showPic()
def update(self):
@@ -107,6 +108,7 @@
self.Thaw()
return
+ self._inShowPic = True
img = self._Image.Copy()
switchProportions = False
if self._rotation:
@@ -166,7 +168,6 @@
self.SetBitmap(self.Bitmap)
except TypeError, e: pass
self.Thaw()
- self._inShowPic = True
self.SetSize((origW, origH))
self._inShowPic = False
@@ -181,6 +182,7 @@
self.__image = val
self._picture = "(stream)"
else:
+ pathExists = os.path.exists(val)
if not val:
# Empty string passed; clear any current image
self._picture = ""
@@ -189,7 +191,7 @@
self.__image = wx.EmptyImage(1, 1)
# self._bmp.ConvertToImage()
self._showPic()
return
- elif not os.path.exists(val):
+ elif not pathExists:
origVal = val
val = dabo.ui.getImagePath(val)
if not os.path.exists(val):
_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]