Code

(no commit message)
authordvlierop2 <dvlierop2@users.sourceforge.net>
Fri, 11 Jan 2008 22:25:33 +0000 (22:25 +0000)
committerdvlierop2 <dvlierop2@users.sourceforge.net>
Fri, 11 Jan 2008 22:25:33 +0000 (22:25 +0000)
src/snap.cpp

index 3bee26f730377cd215b5b4eeb6c06cda80824a0f..73a3b010b277692b8245530ad4cbfcc340baaf40 100644 (file)
@@ -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];     
                 }
             }
         }