Make outline of rubberband selection fixed width

This commit is contained in:
Rebecca Breu 2021-07-13 21:07:48 +02:00
parent 8deb807b06
commit d635a3ea3a
2 changed files with 6 additions and 0 deletions

View file

@ -11,6 +11,8 @@ Fixed
* Double click to zoom an item and double-clicking again should now always
correctly go back to the previous position
* The outline of the rubberband selection now stays the same size
regardless of zoom
0.1.0 - 2021-07-10

View file

@ -610,6 +610,10 @@ class RubberbandItem(BaseItemMixin, QtWidgets.QGraphicsRectItem):
color = QtGui.QColor(SELECT_COLOR)
color.setAlpha(40)
self.setBrush(QtGui.QBrush(color))
pen = QtGui.QPen(QtGui.QColor(0, 0, 0))
pen.setWidth(1)
pen.setCosmetic(True)
self.setPen(pen)
def __str__(self):
return (f'RubberbandItem {self.width} x {self.height}')