Skip to content

Commit 21333e9

Browse files
Update plot_canvas.py
Here is my proposition to keep one of the case that was implemented for issue #63
1 parent 93b3c28 commit 21333e9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

qwt/plot_canvas.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,11 @@ def drawRects(self, rects, count):
7575
# Pyside
7676
if isinstance(rects, (QRect, QRectF)):
7777
self.border.list = [rects]
78-
elif all(isinstance(r, (QRect, QRectF)) for r in rects):
79-
if isinstance(rects, list):
80-
self.border.rectList += rects
81-
else:
82-
# That may not even be necessary
83-
self.border.rectList += [r for r in rects]
78+
elif isinstance(rects, list):
79+
self.border.list += rects
8480
else:
85-
# Should we get here ?
8681
for i in range(count):
87-
self.border.rectList += [rects[i]]
82+
self.border.rectList += [rects.getRect().index(i)]
8883
else:
8984
# PyQt
9085
for i in range(count):

0 commit comments

Comments
 (0)