Commit 53ce5cc4 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix integer division

integer_division: Dividing integer expressions this->width() and 2,
and then converting the integer quotient to type double. Any remainder,
or fractional part of the quotient, is ignored.

CID:250775
parent 90a654fb
......@@ -142,7 +142,7 @@ QPointF KisVisualEllipticalSelectorShape::convertWidgetCoordinateToShapeCoordina
qreal y = 1.0;
qreal offset = 7.0;
QPointF center = QRectF(QPointF(0.0, 0.0), this->size()).center();
qreal a = (this->width()/2);
qreal a = (qreal(this->width()) / qreal(2));
qreal xRel = center.x()-coordinate.x();
qreal yRel = center.y()-coordinate.y();
qreal radius = sqrt(xRel*xRel+yRel*yRel);
......
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