diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/ui/tool | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/ui/tool')
| -rw-r--r-- | src/ui/tool/control-point-selection.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tool/multi-path-manipulator.cpp | 11 | ||||
| -rw-r--r-- | src/ui/tool/node.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tool/node.h | 6 | ||||
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 4 |
5 files changed, 15 insertions, 14 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/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp index 1c683f717..65987ad52 100644 --- a/src/ui/tool/multi-path-manipulator.cpp +++ b/src/ui/tool/multi-path-manipulator.cpp @@ -30,17 +30,6 @@ #include <gdk/gdkkeysyms.h> -#ifdef USE_GNU_HASHES -namespace __gnu_cxx { -template<> -struct hash<Inkscape::UI::NodeList::iterator> { - size_t operator()(Inkscape::UI::NodeList::iterator const &n) const { - return reinterpret_cast<size_t>(n.ptr()); - } -}; -} // namespace __gnu_cxx -#endif // USE_GNU_HASHES - namespace Inkscape { namespace UI { diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index e246bf997..fbbc4be64 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -1217,6 +1217,7 @@ Handle *Node::handleToward(Node *to) return back(); } g_error("Node::handleToward(): second node is not adjacent!"); + return NULL; } Node *Node::nodeToward(Handle *dir) @@ -1228,6 +1229,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) @@ -1239,6 +1241,7 @@ Handle *Node::handleAwayFrom(Node *to) return front(); } g_error("Node::handleAwayFrom(): second node is not adjacent!"); + return NULL; } Node *Node::nodeAwayFrom(Handle *h) @@ -1250,6 +1253,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 diff --git a/src/ui/tool/node.h b/src/ui/tool/node.h index b874949f5..4582d998a 100644 --- a/src/ui/tool/node.h +++ b/src/ui/tool/node.h @@ -12,6 +12,10 @@ #ifndef SEEN_UI_TOOL_NODE_H #define SEEN_UI_TOOL_NODE_H +#if HAVE_CONFIG_H + #include "config.h" +#endif + #include <iterator> #include <iosfwd> #include <stdexcept> @@ -37,7 +41,7 @@ template <typename> class NodeIterator; } } -#if __cplusplus < 201103L +#if HAVE_TR1_UNORDERED_SET namespace std { namespace tr1 { template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >; diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index ec58e2141..338499672 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -18,7 +18,7 @@ #include <boost/shared_ptr.hpp> #include <2geom/bezier-curve.h> #include <2geom/bezier-utils.h> -#include <2geom/svg-path.h> +#include <2geom/path-sink.h> #include <glibmm/i18n.h> #include "ui/tool/path-manipulator.h" #include "desktop.h" @@ -1202,7 +1202,7 @@ void PathManipulator::_createGeometryFromControlPoints(bool alert_LPE) } ++spi; } - builder.finish(); + builder.flush(); Geom::PathVector pathv = builder.peek() * (_edit_transform * _i2d_transform).inverse(); _spcurve->set_pathvector(pathv); if (alert_LPE) { |
