From 03e6a4304f2ccbca68fcd90df66308de45e05fd6 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 11 Jul 2017 12:32:07 +0300 Subject: [PATCH] Fix painting outside of grainline bounding rect. (grafted from cfbfaefb91a4efd42df937bd5d87a2f9459b6f86) --HG-- branch : develop --- src/libs/vwidgets/vgrainlineitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/vwidgets/vgrainlineitem.cpp b/src/libs/vwidgets/vgrainlineitem.cpp index 97175ad96..4b7818b69 100644 --- a/src/libs/vwidgets/vgrainlineitem.cpp +++ b/src/libs/vwidgets/vgrainlineitem.cpp @@ -556,7 +556,7 @@ void VGrainlineItem::UpdateRectangle() pt2.y() - RECT_WIDTH*sin(m_dRotation - M_PI/2)); m_polyBound << QPointF(pt2.x() + RECT_WIDTH*cos(m_dRotation + M_PI/2), pt2.y() - RECT_WIDTH*sin(m_dRotation + M_PI/2)); - m_rectBoundingBox = m_polyBound.boundingRect(); + m_rectBoundingBox = m_polyBound.boundingRect().adjusted(-2, -2, 2, 2); setTransformOriginPoint(m_rectBoundingBox.center()); UpdatePolyResize();