dabo Commit
Revision 6556
Date: 2011-04-14 21:56:55 -0700 (Thu, 14 Apr 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6556

Changed:
U   trunk/ide/ReportDesigner.py

Log:
Changed dynamically-sized bands (height = None) to use height_def for display
in the designer, instead of the hard-coded 75pt used previously. If no 
height_def
has been explicitly set, the 75 is still used to avoid the default of 0, which
would be confusing.


Diff:
Modified: trunk/ide/ReportDesigner.py
===================================================================
--- trunk/ide/ReportDesigner.py 2011-04-15 04:12:02 UTC (rev 6555)
+++ trunk/ide/ReportDesigner.py 2011-04-15 04:56:55 UTC (rev 6556)
@@ -1045,7 +1045,10 @@
                                else:
                                        # Height is None, meaning it is to 
stretch dynamically at runtime.
                                        # However, the user just overrode that 
by setting it explicitly.
-                                       oldHeight = 75
+                                       if "height_def" in self.Parent:
+                                               oldHeight = 
self.Parent._rw.getPt(self.Parent.getProp("Height_def"))
+                                       else:
+                                               oldHeight = 75
                                newHeight = round(oldHeight + (yoffset/z), 1)
                                if newHeight < 0: newHeight = 0
                                self.Parent.setProp("Height", newHeight)
@@ -2148,8 +2151,10 @@
 
                        bandHeight = band.ReportObject.getProp("Height")
                        if bandHeight is None:
-                               # dynamic band height: size of band determined 
at runtime. For now, fake it.
-                               bandHeight = 75
+                               if "height_def" in band.ReportObject:
+                                       bandHeight = 
band.ReportObject.getProp("Height_def")
+                               else:
+                                       bandHeight = 75
                        pointLength = (band._rw.getPt(bandHeight))
                        bandCanvasHeight = z * pointLength
                        band.Height = bandCanvasHeight + b.Height



_______________________________________________
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