summaryrefslogtreecommitdiffstats
path: root/src/snapped-point.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-04-18 19:43:05 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-04-18 19:43:05 +0000
commit36eb7fb624e3a134c8cad002cc3906509cd2888b (patch)
treef063cb9d71818d6feed83a1b3656e707d28ec67b /src/snapped-point.cpp
parentFix for bug #455302 and bug #165529, also partially fixes bounding box of var... (diff)
downloadinkscape-36eb7fb624e3a134c8cad002cc3906509cd2888b.tar.gz
inkscape-36eb7fb624e3a134c8cad002cc3906509cd2888b.zip
Fix bbox snapping as reported in LP bug #562205
Fixed bugs: - https://launchpad.net/bugs/562205 (bzr r9351)
Diffstat (limited to 'src/snapped-point.cpp')
-rw-r--r--src/snapped-point.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp
index 089aa4323..508ec8f62 100644
--- a/src/snapped-point.cpp
+++ b/src/snapped-point.cpp
@@ -164,6 +164,15 @@ bool Inkscape::SnappedPoint::isOtherSnapBetter(Inkscape::SnappedPoint const &oth
}
}
+ // When snapping to a constraint line only, which is not really a snap but merely a projection
+ // to the constraint line, then give this snap a very low priority. Basically, any other snap will do
+ if (other_one.getTarget() == SNAPTARGET_CONSTRAINT) {
+ dist_other += NR_HUGE/2;
+ }
+ if (getTarget() == SNAPTARGET_CONSTRAINT) {
+ dist_this += NR_HUGE/2;
+ }
+
// If it's closer
bool c1 = dist_other < dist_this;
// or, if it's for a snapper with "always snap" turned on, and the previous wasn't