]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/printout.py
reduce the number of objects for a quicker startup time
[wxWidgets.git] / wxPython / wx / lib / printout.py
index 32f3eac88c03c2d8195db09b4ed3c704fad15ce3..2c11a6f2c6ba927f27f791261d987477bbbff6fa 100644 (file)
@@ -612,6 +612,8 @@ class PrintTableDraw(wx.ScrolledWindow, PrintBase):
             except:
                 size = self.row_def_line_size
 
+            if size < 1: return
+
             try:
                 colour = self.row_line_colour[self.data_cnt]
             except:
@@ -633,6 +635,8 @@ class PrintTableDraw(wx.ScrolledWindow, PrintBase):
                 except:
                     size = self.column_def_line_size
 
+                if size < 1: continue
+
                 try:
                     colour = self.column_line_colour[col]
                 except:
@@ -911,7 +915,7 @@ class PrintTable:
         printout2 = SetPrintout(self)
         self.preview = wx.PrintPreview(printout, printout2, data)
         if not self.preview.Ok():
-            wxMessageBox("There was a problem printing!", "Printing", wx.OK)
+            wx.MessageBox("There was a problem printing!", "Printing", wx.OK)
             return
 
         self.preview.SetZoom(60)        # initial zoom value
@@ -1056,10 +1060,10 @@ class SetPrintout(wx.Printout):
         self.end_pg = 1000
 
     def OnBeginDocument(self, start, end):
-        return self.base_OnBeginDocument(start, end)
+        return super(SetPrintout, self).OnBeginDocument(start, end)
 
     def OnEndDocument(self):
-        self.base_OnEndDocument()
+        super(SetPrintout, self).OnEndDocument()
 
     def HasPage(self, page):
         try:
@@ -1079,7 +1083,7 @@ class SetPrintout(wx.Printout):
         return (str_pg, end_pg, str_pg, end_pg)
 
     def OnPreparePrinting(self):
-        self.base_OnPreparePrinting()
+        super(SetPrintout, self).OnPreparePrinting()
 
     def OnBeginPrinting(self):
         dc = self.GetDC()
@@ -1095,7 +1099,7 @@ class SetPrintout(wx.Printout):
         scaleY = float(h) / 1000
         self.printUserScale = min(scaleX, scaleY)
 
-        self.base_OnBeginPrinting()
+        super(SetPrintout, self).OnBeginPrinting()
 
     def GetSize(self):
         self.psizew, self.psizeh = self.GetPPIPrinter()