@@ -48,7 +48,10 @@ def drawRects(self, rects, rectCount=None):
4848 if device is None :
4949 return
5050 if device .mode () != QwtNullPaintDevice .NormalMode :
51- QPaintEngine .drawRects (self , rects , rectCount )
51+ try :
52+ QPaintEngine .drawRects (self , rects , rectCount )
53+ except TypeError :
54+ QPaintEngine .drawRects (self , rects )
5255 return
5356 device .drawRects (rects , rectCount )
5457
@@ -59,7 +62,10 @@ def drawLines(self, lines, lineCount=None):
5962 if device is None :
6063 return
6164 if device .mode () != QwtNullPaintDevice .NormalMode and QT_API .startswith ("pyqt" ):
62- QPaintEngine .drawLines (self , lines , lineCount )
65+ try :
66+ QPaintEngine .drawLines (self , lines , lineCount )
67+ except TypeError :
68+ QPaintEngine .drawLines (self , lines )
6369 return
6470 device .drawLines (lines , lineCount )
6571
@@ -85,7 +91,10 @@ def drawPoints(self, points, pointCount=None):
8591 if device is None :
8692 return
8793 if device .mode () != QwtNullPaintDevice .NormalMode :
88- QPaintEngine .drawPoints (self , points , pointCount )
94+ try :
95+ QPaintEngine .drawPoints (self , points , pointCount )
96+ except TypeError :
97+ QPaintEngine .drawPoints (self , points )
8998 return
9099 device .drawPoints (points , pointCount )
91100
0 commit comments