From 8ac7248513189d82fe5bdf90c0d7fc15f2e718ce Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Tue, 17 Apr 2018 11:03:24 +0300 Subject: fixed bounding box bug --- src/gui/edgeitem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/edgeitem.cpp') diff --git a/src/gui/edgeitem.cpp b/src/gui/edgeitem.cpp index 08a5ad1..88a4e85 100644 --- a/src/gui/edgeitem.cpp +++ b/src/gui/edgeitem.cpp @@ -136,7 +136,9 @@ QPainterPath EdgeItem::path() const void EdgeItem::setPath(const QPainterPath &path) { - _path = path; + prepareGeometryChange(); + + _path = path; // get the shape of the edge, and expand a bit to make selection easier QPainterPathStroker stroker; @@ -147,6 +149,5 @@ void EdgeItem::setPath(const QPainterPath &path) float r = GLOBAL_SCALEF * (_edge->cpDist() + 0.2); _boundingRect = _path.boundingRect().adjusted(-r,-r,r,r); - prepareGeometryChange(); update(); } -- cgit v1.2.3