diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-05-21 21:46:07 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-05-21 21:46:07 +0000 |
| commit | 6e91f64f6479045c9d2fd7702879b73d5988faa2 (patch) | |
| tree | 839b0b991345d107e20b1b83811d156d81b1d219 /src/sp-shape.cpp | |
| parent | Translations. inkscape.pot and French translation update. (diff) | |
| download | inkscape-6e91f64f6479045c9d2fd7702879b73d5988faa2.tar.gz inkscape-6e91f64f6479045c9d2fd7702879b73d5988faa2.zip | |
- "Snap nodes or handles" button now also includes smooth nodes
- Improved snap tooltips
(bzr r9440)
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 |
