mirror of
https://github.com/wassname/sloth.git
synced 2026-08-03 13:10:49 +08:00
normalize rect to avoid negative width or height
This commit is contained in:
@@ -392,7 +392,7 @@ class RectItem(BaseItem):
|
||||
y = self._resize_start_rect.y()
|
||||
h = self._resize_start_rect.height() + diff.y()
|
||||
|
||||
rect = QRectF(QPointF(x,y), QSizeF(w, h))
|
||||
rect = QRectF(QPointF(x,y), QSizeF(w, h)).normalized()
|
||||
|
||||
self._updateRect(rect)
|
||||
self.updateModel()
|
||||
|
||||
Reference in New Issue
Block a user