diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-04-17 11:03:24 +0300 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-04-17 11:03:24 +0300 |
commit | 8ac7248513189d82fe5bdf90c0d7fc15f2e718ce (patch) | |
tree | a537036afd281726cad73b1622935d3084c68f15 /src/gui/edgeitem.cpp | |
parent | 34b60b77d3f9830ddb6a0107bd65aa3c79701305 (diff) |
fixed bounding box bug
Diffstat (limited to 'src/gui/edgeitem.cpp')
-rw-r--r-- | src/gui/edgeitem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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(); } |