From 076c63725886d571c43edc46d0bab28e282841b4 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Sun, 11 Mar 2012 11:52:43 +0100 Subject: [PATCH] normalize rect to avoid negative width or height --- sloth/items/items.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sloth/items/items.py b/sloth/items/items.py index a071e8c..3f51e3f 100644 --- a/sloth/items/items.py +++ b/sloth/items/items.py @@ -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()