dabo Commit
Revision 5435
Date: 2009-09-26 15:53:53 -0700 (Sat, 26 Sep 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5435
Changed:
U trunk/dabo/ui/uiwx/dPageFrameMixin.py
Log:
Reverted some of my earlier changes that removed the use of range() in loops,
as the code in the loop needed the index value.
Diff:
Modified: trunk/dabo/ui/uiwx/dPageFrameMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPageFrameMixin.py 2009-09-26 22:49:03 UTC (rev
5434)
+++ trunk/dabo/ui/uiwx/dPageFrameMixin.py 2009-09-26 22:53:53 UTC (rev
5435)
@@ -314,17 +314,14 @@
if val < 0:
raise ValueError(_("Cannot set PageCount to
less than zero."))
- diff = val - pageCount
- if diff > 0:
- while diff:
+ if val > pageCount:
+ for i in range(pageCount, val):
pg = self.appendPage(pageClass)
- diff -= 1
if not pg.Caption:
pg.Caption = _("Page %s") %
(i+1,)
- else:
- while diff:
+ elif val < pageCount:
+ for i in range(pageCount, val, -1):
self.DeletePage(i-1)
- diff += 1
else:
self._properties["PageCount"] = 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/[email protected]