diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-11-13 01:28:48 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-11-13 01:28:48 +0000 |
| commit | c87f7224241b1a7f46feacbd60bf31e578efec09 (patch) | |
| tree | 3afe0794caa864503604c0af0ef678e67944d204 /src/ui/dialog/transformation.cpp | |
| parent | add compiler warning flags from configure.ac to build.xml (diff) | |
| download | inkscape-c87f7224241b1a7f46feacbd60bf31e578efec09.tar.gz inkscape-c87f7224241b1a7f46feacbd60bf31e578efec09.zip | |
fix 1830356
(bzr r4074)
Diffstat (limited to 'src/ui/dialog/transformation.cpp')
| -rw-r--r-- | src/ui/dialog/transformation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index a87f473e8..3110289d2 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -617,16 +617,16 @@ Transformation::applyPageScale(Inkscape::Selection *selection) NR::Maybe<NR::Rect> bbox(sp_item_bbox_desktop(item)); if (bbox) { double new_width = scaleX; - if (new_width < 1e-6) new_width = 1e-6; // not 0, as this would result in a nasty no-bbox object + if (fabs(new_width) < 1e-6) new_width = 1e-6; // not 0, as this would result in a nasty no-bbox object double new_height = scaleY; - if (new_height < 1e-6) new_height = 1e-6; + if (fabs(new_height) < 1e-6) new_height = 1e-6; scale = NR::scale(new_width / bbox->extent(NR::X), new_height / bbox->extent(NR::Y)); } } else { double new_width = scaleX; - if (new_width < 1e-6) new_width = 1e-6; + if (fabs(new_width) < 1e-6) new_width = 1e-6; double new_height = scaleY; - if (new_height < 1e-6) new_height = 1e-6; + if (fabs(new_height) < 1e-6) new_height = 1e-6; scale = NR::scale(new_width / 100.0, new_height / 100.0); } sp_item_scale_rel (item, scale); @@ -639,15 +639,15 @@ Transformation::applyPageScale(Inkscape::Selection *selection) // the values are increments! if (_units_scale.isAbsolute()) { double new_width = scaleX; - if (new_width < 1e-6) new_width = 1e-6; + if (fabs(new_width) < 1e-6) new_width = 1e-6; double new_height = scaleY; - if (new_height < 1e-6) new_height = 1e-6; + if (fabs(new_height) < 1e-6) new_height = 1e-6; scale = NR::scale(new_width / bbox->extent(NR::X), new_height / bbox->extent(NR::Y)); } else { double new_width = scaleX; - if (new_width < 1e-6) new_width = 1e-6; + if (fabs(new_width) < 1e-6) new_width = 1e-6; double new_height = scaleY; - if (new_height < 1e-6) new_height = 1e-6; + if (fabs(new_height) < 1e-6) new_height = 1e-6; scale = NR::scale(new_width / 100.0, new_height / 100.0); } sp_selection_scale_relative(selection, center, scale); |
