Salome HOME
bug #136 - problems with performance
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportImageOp.cxx
index 4f7afb9b2e0fd6009a2a7324a80ca2da9c650e57..e9c2fa388414b9f806951f713480916d85bf0c81 100644 (file)
@@ -310,30 +310,30 @@ 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 
   {
     // check that two points are not identical
-    if ( ValuesEquals( xa, ya ) && ValuesEquals( xb, yb ) )
+    if ( ValuesEquals( xa, xb ) && ValuesEquals( ya, yb ) )
     {
       theErrorMsg = thePoinErrMsg;
       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;
-    }
-  }
-
   return true;
 }