summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfcc302)
raw | patch | inline | side by side (parent: bfcc302)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sun, 15 Aug 2010 19:54:12 +0000 (21:54 +0200) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sun, 15 Aug 2010 19:54:12 +0000 (21:54 +0200) |
src/snap-candidate.h | patch | blob | history | |
src/snap.cpp | patch | blob | history | |
src/ui/tool/node.cpp | patch | blob | history |
diff --git a/src/snap-candidate.h b/src/snap-candidate.h
index a0fc3290cde5892d37c9e97188b728f3e2b62222..5c283440305ce7570d7744457f43b5972886dfbb 100644 (file)
--- a/src/snap-candidate.h
+++ b/src/snap-candidate.h
_target_bbox = Geom::OptRect();
}
- SnapCandidatePoint(Geom::Point const &point, Inkscape::SnapSourceType const source, long const source_num = 0)
+ SnapCandidatePoint(Geom::Point const &point, Inkscape::SnapSourceType const source)
: _point(point),
_source_type(source),
_target_type(Inkscape::SNAPTARGET_UNDEFINED),
- _source_num(source_num)
+ _source_num(0)
{
_target_bbox = Geom::OptRect();
}
diff --git a/src/snap.cpp b/src/snap.cpp
index bcdf6c94faa017682826e5e8c635fcc3b81a6ea7..9cde24e16b25ed80354a7ebe0843308e24ad070d 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
Inkscape::Snapper::SnapConstraint const &constraint,
Geom::OptRect const &bbox_to_snap) const
{
- Inkscape::SnappedPoint const s = constrainedSnap(Inkscape::SnapCandidatePoint(p, source_type, 0), constraint, bbox_to_snap);
+ Inkscape::SnappedPoint const s = constrainedSnap(Inkscape::SnapCandidatePoint(p, source_type), constraint, bbox_to_snap);
s.getPoint(p);
}
bbox.expandTo(transformed);
}
- transformed_points.push_back(Inkscape::SnapCandidatePoint(transformed, (*i).getSourceType(), source_num));
+ transformed_points.push_back(Inkscape::SnapCandidatePoint(transformed, (*i).getSourceType(), source_num, Inkscape::SNAPTARGET_UNDEFINED, Geom::OptRect()));
source_num++;
}
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index f6fb6cc54da0562dc261c9506815637b5a806fc9..1070e4bc38d6deb0df3700b0520b406a4e972a9e 100644 (file)
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
SnapManager &sm = _desktop->namedview->snap_manager;
bool snap = sm.someSnapperMightSnap();
Inkscape::SnappedPoint sp;
+ std::vector<Inkscape::SnapCandidatePoint> unselected;
if (snap) {
/* setup
* TODO We are doing this every time a snap happens. It should once be done only once
* TODO Snapping to unselected segments of selected paths doesn't work yet. */
// Build the list of unselected nodes.
- std::vector<Inkscape::SnapCandidatePoint> unselected;
typedef ControlPointSelection::Set Set;
Set &nodes = _selection.allPoints();
for (Set::iterator i = nodes.begin(); i != nodes.end(); ++i) {