summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b26887f)
raw | patch | inline | side by side (parent: b26887f)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sun, 31 Jan 2010 00:46:57 +0000 (01:46 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sun, 31 Jan 2010 00:46:57 +0000 (01:46 +0100) |
src/ui/tool/node.cpp | patch | blob | history |
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index f2bec1f5ffb3fa5a7295df47ce293886f428707d..2675b4045f796a82c2d38429fafbc88c9a207cec 100644 (file)
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
if (held_control(*event)) {
Geom::Point origin = _last_drag_origin();
+ Inkscape::SnappedPoint fp, bp;
if (held_alt(*event)) {
// with Ctrl+Alt, constrain to handle lines
// project the new position onto a handle line that is closer
// TODO: combine these two branches by modifying snap.h / snap.cpp
if (snap) {
- Inkscape::SnappedPoint fp, bp;
fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_front);
bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_back);
-
+ }
+ if (fp.getSnapped() || bp.getSnapped()) {
if (fp.isOtherSnapBetter(bp, false)) {
bp.getPoint(new_pos);
} else {
// with Ctrl, constrain to axes
// TODO combine the two branches
if (snap) {
- Inkscape::SnappedPoint fp, bp;
Inkscape::Snapper::ConstraintLine line_x(origin, Geom::Point(1, 0));
Inkscape::Snapper::ConstraintLine line_y(origin, Geom::Point(0, 1));
fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_x);
bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_y);
-
+ }
+ if (fp.getSnapped() || bp.getSnapped()) {
if (fp.isOtherSnapBetter(bp, false)) {
fp = bp;
}