summaryrefslogtreecommitdiffstats
path: root/src/ui/tool
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-03-23 17:45:35 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-03-23 17:45:35 +0000
commitec3232de2273e8d3e1efc0b89b30c770dd6a9a71 (patch)
treee084165557d264e0d7641647af1bdd9f9765897b /src/ui/tool
parentFixed bug continuing cusp nodes (diff)
parentfix Windows build for newer gcc/libs (diff)
downloadinkscape-ec3232de2273e8d3e1efc0b89b30c770dd6a9a71.tar.gz
inkscape-ec3232de2273e8d3e1efc0b89b30c770dd6a9a71.zip
update to trunk
(bzr r11950.1.311)
Diffstat (limited to 'src/ui/tool')
-rw-r--r--src/ui/tool/control-point-selection.cpp4
-rw-r--r--src/ui/tool/node.cpp4
2 files changed, 8 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();
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 73460a313..4824e13fb 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -1351,6 +1351,7 @@ Handle *Node::handleToward(Node *to)
return back();
}
g_error("Node::handleToward(): second node is not adjacent!");
+ return NULL;
}
Node *Node::nodeToward(Handle *dir)
@@ -1362,6 +1363,7 @@ Node *Node::nodeToward(Handle *dir)
return _prev();
}
g_error("Node::nodeToward(): handle is not a child of this node!");
+ return NULL;
}
Handle *Node::handleAwayFrom(Node *to)
@@ -1373,6 +1375,7 @@ Handle *Node::handleAwayFrom(Node *to)
return front();
}
g_error("Node::handleAwayFrom(): second node is not adjacent!");
+ return NULL;
}
Node *Node::nodeAwayFrom(Handle *h)
@@ -1384,6 +1387,7 @@ Node *Node::nodeAwayFrom(Handle *h)
return _next();
}
g_error("Node::nodeAwayFrom(): handle is not a child of this node!");
+ return NULL;
}
Glib::ustring Node::_getTip(unsigned state) const