From ad72a653c9ae867201bb36fc41a4e8eb2459d0d5 Mon Sep 17 00:00:00 2001 From: Denis Declara Date: Tue, 1 May 2012 17:19:13 +0200 Subject: Added undo support for polar arrangement as well as some minor fixes (bzr r11073.1.26) --- src/ui/dialog/polararrangetab.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/dialog/polararrangetab.cpp b/src/ui/dialog/polararrangetab.cpp index faad5493b..afb2ce680 100644 --- a/src/ui/dialog/polararrangetab.cpp +++ b/src/ui/dialog/polararrangetab.cpp @@ -149,7 +149,8 @@ void rotateAround(SPItem *item, Geom::Point center, Geom::Rotate const &rotation float calcAngle(float arcBegin, float arcEnd, int count, int n) { float arcLength = arcEnd - arcBegin; - if(abs(abs(arcLength) - 2*M_PI) > 0.0001) count--; // If not a complete circle, put an object also at the extremes of the arc; + float delta = std::abs(std::abs(arcLength) - 2*M_PI); + if(delta > 0.01) count--; // If not a complete circle, put an object also at the extremes of the arc; float angle = n / (float)count; // Normalize for arcLength: @@ -277,6 +278,9 @@ void PolarArrangeTab::arrange() tmp = tmp->next; ++i; } + + DocumentUndo::done(sp_desktop_document(parent->getDesktop()), SP_VERB_SELECTION_ARRANGE, + _("Arrange on ellipse")); } void PolarArrangeTab::updateSelection() -- cgit v1.2.3