]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Checking of matrix invertibles is prohibited for case of two points.
authoradv <adv@opencascade.com>
Wed, 27 Nov 2013 11:44:58 +0000 (11:44 +0000)
committeradv <adv@opencascade.com>
Wed, 27 Nov 2013 11:44:58 +0000 (11:44 +0000)
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx

index 54a3095cdfe6724b6774977a0b80fd76df1cca7f..e9c2fa388414b9f806951f713480916d85bf0c81 100644 (file)
@@ -310,6 +310,19 @@ bool HYDROGUI_ImportImageOp::checkPoints( const QPointF& thePointA,
       theErrorMsg = theLineErrMsg;
       return false;
     }
+
+    if ( theIsToCheckInvertibles )
+    {
+      QTransform aTransform1( xa, ya, 1, xb, yb, 1, xc, yc, 1 );
+
+      bool anIsInvertible = false;
+      QTransform aTransform1Inverted = aTransform1.inverted( &anIsInvertible );
+      if( !anIsInvertible )
+      {
+        theErrorMsg = tr( "TRANSFORMATION_MATRIX_CANNOT_BE_COMPUTED" );
+        return false;
+      }
+    }
   }
   else 
   {
@@ -321,19 +334,6 @@ bool HYDROGUI_ImportImageOp::checkPoints( const QPointF& thePointA,
     }
   }
 
-  if ( theIsToCheckInvertibles )
-  {
-    QTransform aTransform1( xa, ya, 1, xb, yb, 1, xc, yc, 1 );
-
-    bool anIsInvertible = false;
-    QTransform aTransform1Inverted = aTransform1.inverted( &anIsInvertible );
-    if( !anIsInvertible )
-    {
-      theErrorMsg = tr( "TRANSFORMATION_MATRIX_CANNOT_BE_COMPUTED" );
-      return false;
-    }
-  }
-
   return true;
 }