Commit 917c724e authored by Thorsten Zachmann's avatar Thorsten Zachmann

o don't create insets on the heap but on the stack

svn path=/trunk/koffice/; revision=605433
parent f9412c55
......@@ -142,14 +142,12 @@ bool KoShape::hitTest( const QPointF &position ) const
return false;
QPointF point( position * m_invMatrix );
KoInsets *insets = new KoInsets(0, 0, 0, 0);
KoInsets insets(0, 0, 0, 0);
if(m_border)
m_border->borderInsets(this, *insets);
m_border->borderInsets(this, insets);
bool hit = point.x() >= -insets->left && point.x() <= m_size.width() + insets->right &&
point.y() >= -insets->top && point.y() <= m_size.height() + insets->bottom;
delete insets;
return hit;
return point.x() >= -insets.left && point.x() <= m_size.width() + insets.right &&
point.y() >= -insets.top && point.y() <= m_size.height() + insets.bottom;
}
QRectF KoShape::boundingRect() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment