connect( aPanel, SIGNAL( modeActivated( int ) ), SLOT( onModeActivated( int ) ) );
connect( aPanel, SIGNAL( refImageActivated( const QString& ) ),
SLOT( onRefImageActivated( const QString& ) ) );
- connect( aPanel, SIGNAL( setIsByTwoPoints( bool ) ), SLOT( onSetIsByTwoPoints( bool ) ) );
+ connect( aPanel, SIGNAL( setCIsUsed( bool ) ), SLOT( onSetCIsUsed( bool ) ) );
return aPanel;
}
-void HYDROGUI_ImportImageOp::onSetIsByTwoPoints( bool theIsSetByTwoPoints )
+void HYDROGUI_ImportImageOp::onSetCIsUsed( bool theCIsUsed )
{
if ( myPreviewPrs )
{
- myPreviewPrs->setIsByTwoPoints( theIsSetByTwoPoints );
+ myPreviewPrs->setIsByTwoPoints( !theCIsUsed );
}
if ( myRefPreviewPrs )
{
- myRefPreviewPrs->setIsByTwoPoints( theIsSetByTwoPoints );
+ myRefPreviewPrs->setIsByTwoPoints( !theCIsUsed );
}
}
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;
}
const HYDROGUI_PrsImage::TransformationPointMap& aPointMap =
aPrs->getTransformationPointMap();
+
HYDROGUI_PrsImage::TransformationPointMapIterator anIter( aPointMap );
while( anIter.hasNext() )
{