summaryrefslogtreecommitdiffstats
path: root/src/sp-shape.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-13 20:16:51 +0000
committerTed Gould <ted@gould.cx>2010-07-13 20:16:51 +0000
commitef2d72d29fce61231bdd7888ab8330503158e9d6 (patch)
tree4685bfddef010181fdd87fc182016b994f2b69d9 /src/sp-shape.cpp
parentPulling in a more recent trunk (diff)
parentTranslations. Romanian nsh file update. (diff)
downloadinkscape-ef2d72d29fce61231bdd7888ab8330503158e9d6.tar.gz
inkscape-ef2d72d29fce61231bdd7888ab8330503158e9d6.zip
Upgrading to trunk
(bzr r8254.1.57)
Diffstat (limited to 'src/sp-shape.cpp')
-rw-r--r--src/sp-shape.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index dadcb5f57..3064341b6 100644
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
@@ -1227,7 +1227,24 @@ static void sp_shape_snappoints(SPItem const *item, std::vector<Inkscape::SnapCa
bool c2 = snapprefs->getSnapSmoothNodes() && (nodetype == Geom::NODE_SMOOTH || nodetype == Geom::NODE_SYMM);
if (c1 || c2) {
- p.push_back(Inkscape::SnapCandidatePoint(curve_it1->finalPoint() * i2d, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
+ Inkscape::SnapSourceType sst;
+ Inkscape::SnapTargetType stt;
+ switch (nodetype) {
+ case Geom::NODE_CUSP:
+ sst = Inkscape::SNAPSOURCE_NODE_CUSP;
+ stt = Inkscape::SNAPTARGET_NODE_CUSP;
+ break;
+ case Geom::NODE_SMOOTH:
+ case Geom::NODE_SYMM:
+ sst = Inkscape::SNAPSOURCE_NODE_SMOOTH;
+ stt = Inkscape::SNAPTARGET_NODE_SMOOTH;
+ break;
+ default:
+ sst = Inkscape::SNAPSOURCE_UNDEFINED;
+ stt = Inkscape::SNAPTARGET_UNDEFINED;
+ break;
+ }
+ p.push_back(Inkscape::SnapCandidatePoint(curve_it1->finalPoint() * i2d, sst, stt));
}
// Consider midpoints of line segments for snapping