summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-11-23 13:55:26 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-11-23 13:55:26 +0000
commit6b8572be4bdae9ee79fc42c9d18fd9882dec21aa (patch)
treeccfc4f2203495ee82127b0cb596f23a9d9f48803 /src/seltrans.cpp
parentUpdating the includes on these files because they need to include simple-node... (diff)
downloadinkscape-6b8572be4bdae9ee79fc42c9d18fd9882dec21aa.tar.gz
inkscape-6b8572be4bdae9ee79fc42c9d18fd9882dec21aa.zip
1) Improve the way the distance to the pointer is taken into account when finding the best snap
2) Use this distance also when snapping nodes in the path editor 3) Add a slider in the preferences dialog to control the weighing of this distance (bzr r6895)
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 614ce7584..34ea17a64 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1413,10 +1413,9 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state)
/* Pick one */
Inkscape::SnappedPoint best_snapped_point;
- g_assert(best_snapped_point.getDistance() == NR_HUGE);
for (std::list<Inkscape::SnappedPoint>::const_iterator i = s.begin(); i != s.end(); i++) {
if (i->getSnapped()) {
- if (i->getDistance() < best_snapped_point.getDistance()) {
+ if (best_snapped_point.isOtherOneBetter(*i, true)) {
best_snapped_point = *i;
dxy = i->getTransformation();
}