summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/control-point-selection.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-26 01:00:24 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-26 01:00:24 +0000
commita5c919f46c359f26433cb42a82bb99fbb729a467 (patch)
treea9d00aafdfa2cb160257d25ebeae78f6a6d6ca30 /src/ui/tool/control-point-selection.cpp
parenttiny bugfix for Taper Strokes (diff)
parentmake it easier for people to build with -Werror on Windows (diff)
downloadinkscape-a5c919f46c359f26433cb42a82bb99fbb729a467.tar.gz
inkscape-a5c919f46c359f26433cb42a82bb99fbb729a467.zip
Update to trunk
Massive cleanup of outlining code (bzr r13090.1.31)
Diffstat (limited to 'src/ui/tool/control-point-selection.cpp')
-rw-r--r--src/ui/tool/control-point-selection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/tool/control-point-selection.cpp b/src/ui/tool/control-point-selection.cpp
index b5ee0a597..d10ed0f0d 100644
--- a/src/ui/tool/control-point-selection.cpp
+++ b/src/ui/tool/control-point-selection.cpp
@@ -194,6 +194,8 @@ void ControlPointSelection::align(Geom::Dim2 axis)
bound.unionWith(Geom::OptInterval((*i)->position()[d]));
}
+ if (!bound) { return; }
+
double new_coord = bound->middle();
for (iterator i = _points.begin(); i != _points.end(); ++i) {
Geom::Point pos = (*i)->position();
@@ -220,6 +222,8 @@ void ControlPointSelection::distribute(Geom::Dim2 d)
bound.unionWith(Geom::OptInterval(pos[d]));
}
+ if (!bound) { return; }
+
// now we iterate over the multimap and set aligned positions.
double step = size() == 1 ? 0 : bound->extent() / (size() - 1);
double start = bound->min();