diff --git a/src/ui/dialog/polar-arrange-tab.cpp b/src/ui/dialog/polar-arrange-tab.cpp index 8faabfd7f1bea54ff2948e29cfc48d8c1c42caa6..1b69a81a8ed6583d113ccb3f5c5383be82501fe8 100644 --- a/src/ui/dialog/polar-arrange-tab.cpp +++ b/src/ui/dialog/polar-arrange-tab.cpp @@ -104,7 +104,7 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_) parametersTable.attach(radiusX, 1, 1, 1, 1); parametersTable.attach(radiusY, 2, 1, 1, 1); - angleLabel.set_text(_("Angle X/Y:")); + angleLabel.set_text(_("Angle start/end:")); parametersTable.attach(angleLabel, 0, 2, 1, 1); angleX.setDigits(2); angleX.setIncrements(0.2, 0); @@ -272,7 +272,13 @@ void PolarArrangeTab::arrange() bool arrangeOnFirstEllipse = arrangeOnEllipse && arrangeOnFirstCircleRadio.get_active(); float yaxisdir = parent->getDesktop()->yaxisdir(); - int count = 0; + int count = tmp.size(); + float cx, cy; // Center of the ellipse + float rx, ry; // Radiuses of the ellipse in x and y direction + float arcBeg; + float arcLength; + bool whole = false; + Geom::Affine transformation; // Any additional transformation to apply to the objects if (arrangeOnEllipse) { for (auto item : tmp) { if (auto ellipse = cast(item)) { @@ -280,19 +286,8 @@ void PolarArrangeTab::arrange() referenceEllipse = ellipse; } } - ++count; } - } else { - count = tmp.size(); - } - float cx, cy; // Center of the ellipse - float rx, ry; // Radiuses of the ellipse in x and y direction - float arcBeg; - float arcLength; - bool whole = false; - Geom::Affine transformation; // Any additional transformation to apply to the objects - if (arrangeOnEllipse) { if (!referenceEllipse) { if (auto desktop = parent->getDesktop()) { desktop->showNotice(_("Couldn't find an ellipse in selection"), 5000); @@ -329,7 +324,7 @@ void PolarArrangeTab::arrange() arcBeg = angleX.getValue("rad"); float arcEnd = angleY.getValue("rad"); arcLength = arcEnd - arcBeg; - if (std::abs(arcLength - M_PI * 2) < 0.00001) { + if (std::abs(std::abs(arcLength) - M_PI * 2) < 0.00001) { whole = true; } transformation.setIdentity();