Skip to content

Commit 1e73388

Browse files
committed
explicitly test _drawRect against None
1 parent 192dbf0 commit 1e73388

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt4agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def paintEvent(self, e):
113113
p.drawPixmap(QtCore.QPoint(0, 0), QtGui.QPixmap.fromImage(qImage))
114114

115115
# draw the zoom rectangle to the QPainter
116-
if self._drawRect:
116+
if self._drawRect is not None:
117117
p.setPen(QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.DotLine))
118118
x, y, w, h = self._drawRect
119119
p.drawRect(x, y, w, h)

0 commit comments

Comments
 (0)