diff options
| author | Denis Declara <declara91@gmail.com> | 2012-05-01 15:19:13 +0000 |
|---|---|---|
| committer | Denis Declara <declara91@gmail.com> | 2012-05-01 15:19:13 +0000 |
| commit | ad72a653c9ae867201bb36fc41a4e8eb2459d0d5 (patch) | |
| tree | 8868bfbf2cf7e3ebe29a374adf806af02b06be1a | |
| parent | Got parametrized arrangement to work (diff) | |
| download | inkscape-ad72a653c9ae867201bb36fc41a4e8eb2459d0d5.tar.gz inkscape-ad72a653c9ae867201bb36fc41a4e8eb2459d0d5.zip | |
Added undo support for polar arrangement as well as some minor fixes
(bzr r11073.1.26)
| -rw-r--r-- | src/ui/dialog/polararrangetab.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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() |
