From: adv Date: Wed, 27 Nov 2013 11:44:58 +0000 (+0000) Subject: Checking of matrix invertibles is prohibited for case of two points. X-Git-Tag: issue_132_11_28~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fa233033e287e2fa52426dd3081b49097e3f08d5;p=modules%2Fhydro.git Checking of matrix invertibles is prohibited for case of two points. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index 54a3095c..e9c2fa38 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -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; }