summaryrefslogtreecommitdiffstats
path: root/src/gradient-drag.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2011-09-02 20:14:29 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2011-09-02 20:14:29 +0000
commit59259f0cabfa0205acc3229c281169e8406570b3 (patch)
tree316245d4025c28f083fb60de3bf8409c6be9c0cb /src/gradient-drag.cpp
parentExtensions. Fix for a potential crasher in the extension scripts. (diff)
downloadinkscape-59259f0cabfa0205acc3229c281169e8406570b3.tar.gz
inkscape-59259f0cabfa0205acc3229c281169e8406570b3.zip
Rename the struct "SnappedConstraints" to the more meaningfull "IntermSnapResults"
(bzr r10612)
Diffstat (limited to 'src/gradient-drag.cpp')
-rw-r--r--src/gradient-drag.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 585c55c28..afed09654 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -645,7 +645,7 @@ gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gp
sp_knot_moveto (knot, p);
}
} else if (state & GDK_CONTROL_MASK) {
- SnappedConstraints sc;
+ IntermSnapResults isr;
Inkscape::SnapCandidatePoint scp = Inkscape::SnapCandidatePoint(p, Inkscape::SNAPSOURCE_OTHER_HANDLE);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
unsigned snaps = abs(prefs->getInt("/options/rotationsnapsperpi/value", 12));
@@ -704,24 +704,24 @@ gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gp
sp = m.constrainedAngularSnap(scp, boost::optional<Geom::Point>(), dr_snap, snaps);
}
m.unSetup();
- sc.points.push_back(sp);
+ isr.points.push_back(sp);
}
}
m.setup(desktop, false); // turn of the snap indicator temporarily
- Inkscape::SnappedPoint bsp = m.findBestSnap(scp, sc, true);
+ Inkscape::SnappedPoint bsp = m.findBestSnap(scp, isr, true);
m.unSetup();
if (!bsp.getSnapped()) {
// If we didn't truly snap to an object or to a grid, then we will still have to look for the
// closest projection onto one of the constraints. findBestSnap() will not do this for us
- for (std::list<Inkscape::SnappedPoint>::const_iterator i = sc.points.begin(); i != sc.points.end(); i++) {
- if (i == sc.points.begin() || (Geom::L2((*i).getPoint() - p) < Geom::L2(bsp.getPoint() - p))) {
+ for (std::list<Inkscape::SnappedPoint>::const_iterator i = isr.points.begin(); i != isr.points.end(); i++) {
+ if (i == isr.points.begin() || (Geom::L2((*i).getPoint() - p) < Geom::L2(bsp.getPoint() - p))) {
bsp.setPoint((*i).getPoint());
bsp.setTarget(Inkscape::SNAPTARGET_CONSTRAINED_ANGLE);
}
}
}
- //p = sc.points.front().getPoint();
+ //p = isr.points.front().getPoint();
p = bsp.getPoint();
sp_knot_moveto (knot, p);
}