Snapshot/SnapshotRegionGrabber.py

changeset 5653
c023821bb25f
parent 5389
9b1c800daff3
child 5664
9b318fcb1ee2
--- a/Snapshot/SnapshotRegionGrabber.py	Wed Mar 22 18:56:25 2017 +0100
+++ b/Snapshot/SnapshotRegionGrabber.py	Wed Mar 22 19:59:45 2017 +0100
@@ -16,7 +16,7 @@
 from PyQt5.QtWidgets import QWidget, QApplication, QToolTip
 
 
-def drawRect(painter, rect, outline, fill=QColor()):
+def drawRect(painter, rect, outline, fill=None):
     """
     Module function to draw a rectangle with the given parameters.
     
@@ -35,7 +35,7 @@
     painter.drawRect(rect)
     if fill.isValid():
         painter.setClipping(False)
-        painter.setBrush(fill)
+        painter.setBrush(fill or QColor())
         painter.drawRect(rect.adjusted(1, 1, -1, -1))
     painter.restore()
 

eric ide

mercurial