summaryrefslogtreecommitdiffstats
path: root/src/snap.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-01-11 22:25:33 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-01-11 22:25:33 +0000
commit2c34fa4cbb6f61bcbf7c88416d9114dc12fd563b (patch)
treeafc4dd08cff6ec93c67cd83dc81ba704f2ff41c4 /src/snap.cpp
parentUpdate doc/keys.xml (new Alt modifier in ellipse tool) (diff)
downloadinkscape-2c34fa4cbb6f61bcbf7c88416d9114dc12fd563b.tar.gz
inkscape-2c34fa4cbb6f61bcbf7c88416d9114dc12fd563b.zip
(bzr r4464)
Diffstat (limited to 'src/snap.cpp')
-rw-r--r--src/snap.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/snap.cpp b/src/snap.cpp
index 3bee26f73..73a3b010b 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -527,13 +527,12 @@ std::pair<NR::Point, bool> SnapManager::_snapTransformed(
if (transformation_type == SCALE) {
// When scaling, don't ever exit with one of scaling components set to NR_HUGE
- if (best_transformation == NR::Point(NR_HUGE, NR_HUGE)) {
- best_transformation == transformation; // return the original (i.e. un-snapped) transformation
- } else {
- // Still one of the transformation components could be NR_HUGE
- for (int index = 0; index < 2; index++) {
- if (best_transformation[index] == NR_HUGE) {
- best_transformation[index] == uniform ? best_transformation[1-index] : transformation[index];
+ for (int index = 0; index < 2; index++) {
+ if (best_transformation[index] == NR_HUGE) {
+ if (uniform && best_transformation[1-index] < NR_HUGE) {
+ best_transformation[index] = best_transformation[1-index];
+ } else {
+ best_transformation[index] = transformation[index];
}
}
}