MapItemEllipse fix

This commit is contained in:
2024-08-31 22:19:26 +03:00
parent ab423e1530
commit 2eacbfbfc1
2 changed files with 15 additions and 2 deletions

View File

@@ -69,7 +69,8 @@ void MapItemEllipse::rebuild() {
} else {
if (enda < starta) qSwap(starta, enda);
}
for (double a = starta; a <= enda; a += 3.) {
const double astep = 3.;
for (double a = starta; a < enda + astep; a += astep) {
if (a > enda) a = enda;
QPointF p(sin(a * deg2rad) * w, cos(a * deg2rad) * h);
pol << (c + p);