diff options
| author | Ted Gould <ted@gould.cx> | 2010-07-13 20:16:51 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-07-13 20:16:51 +0000 |
| commit | ef2d72d29fce61231bdd7888ab8330503158e9d6 (patch) | |
| tree | 4685bfddef010181fdd87fc182016b994f2b69d9 /src/sp-shape.cpp | |
| parent | Pulling in a more recent trunk (diff) | |
| parent | Translations. Romanian nsh file update. (diff) | |
| download | inkscape-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.cpp | 19 |
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 |
