Commit b49d9789 authored by Agata Cacko's avatar Agata Cacko

Fix Grow Selection expanding in one direction

Before this commit there was a mistake in calculating
the border of the selection. It was caused by misreading
the original calculation equation while fixing the
CID issue (dividing by 0).
This commit fixes the behaviour by ensuring that
the value is being multiplied, not divided by sqrt.

parent d4dfd7b6
......@@ -59,11 +59,11 @@ void KisSelectionFilter::computeBorder(qint32* circ, qint32 xradius, qint32 yrad
tmp = 0.0;
double divisor = (double) xradius * sqrt(xradius * xradius - tmp * tmp);
double divisor = (double) xradius;
if (divisor == 0.0) {
divisor = 1.0;
circ[i] = (qint32) RINT(yradius / divisor);
circ[i] = (qint32) RINT(yradius * sqrt(xradius * xradius - tmp * tmp) / divisor);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment