Fix issue w/ stroke not appearing when drawing past rect bounds

This commit is contained in:
Aleksey Alexandrovich Okoneshnikov 2026-02-21 16:23:40 -08:00
parent 6fc6dd8dce
commit 7fa170ea16
No known key found for this signature in database
GPG key ID: 25BA731585792EB7
2 changed files with 9 additions and 1 deletions

View file

@ -781,7 +781,14 @@ class BeePathItem(BeeItemMixin, QtWidgets.QGraphicsItem):
return self.boundingRect().contains(point)
def bounding_rect_unselected(self):
return QtCore.QRectF(self._cached_rect)
rect = QtCore.QRectF(self._cached_rect)
if self.temp_stroke:
base_size = self.temp_stroke.get('base_size', 10)
for pt in self.temp_stroke.get('points', []):
r = base_size * pt.get('pressure', 1.0) / 2 + 1
rect = rect.united(QtCore.QRectF(
pt['x'] - r, pt['y'] - r, 2 * r, 2 * r))
return rect
def add_stroke(self, stroke):
self.prepareGeometryChange()

View file

@ -1001,6 +1001,7 @@ class BeeGraphicsView(MainControlsMixin,
'y': round(local_pos.y(), 1),
'pressure': self._tablet_pressure,
})
self.draw_item.prepareGeometryChange()
self.draw_item.temp_stroke = self.draw_current_stroke
self.draw_item.update()
event.accept()