dabo Commit
Revision 5480
Date: 2009-10-22 10:24:20 -0700 (Thu, 22 Oct 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5480

Changed:
U   trunk/dabo/lib/reportWriter.py
U   trunk/ide/ReportDesigner.py

Log:
Added the ability to add a Paragraph (Frameset/Paragraph) to a report using
the ReportDesigner.

I thought there was a ticket for this but can't find it now.


Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2009-10-21 22:28:02 UTC (rev 5479)
+++ trunk/dabo/lib/reportWriter.py      2009-10-22 17:24:20 UTC (rev 5480)
@@ -182,6 +182,10 @@
                return obj
 
        def addObject(self, cls, collectionClass=Objects):
+               if cls is Paragraph and not isinstance(self, Frameset):
+                       fs = self.addObject(Frameset)
+                       fs.addObject(Paragraph)
+                       return fs
                obj = cls(self)
                collectionName = Objects.__name__
                objects = self.get(collectionName, collectionClass(self))

Modified: trunk/ide/ReportDesigner.py
===================================================================
--- trunk/ide/ReportDesigner.py 2009-10-21 22:28:02 UTC (rev 5479)
+++ trunk/ide/ReportDesigner.py 2009-10-22 17:24:20 UTC (rev 5480)
@@ -208,7 +208,7 @@
                                if not newObjectMenuCreated and 
isinstance(robj, Band):
                                        newObjectMenuCreated = True
                                        objectChoices = 
dabo.ui.dMenu(Caption="New object")
-                                       for choice in (Image, Line, Rectangle, 
String):
+                                       for choice in (Image, Line, Rectangle, 
String, Paragraph):
                                                
objectChoices.append(choice.__name__, 
                                                                
OnHit=onNewObject, Tag=choice)
                                        objectChoices.appendSeparator()




_______________________________________________
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