X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportImageOp.cxx;h=4f7afb9b2e0fd6009a2a7324a80ca2da9c650e57;hb=de7cf9bb0a7a41d6487013c87f4a54d0664cd303;hp=d3a82f89b9b147c73096e8a65dede7ee3bc5e361;hpb=89d5a8fa1a630d86a352d32ffd7689c2660e52d2;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index d3a82f89..4f7afb9b 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -217,6 +217,7 @@ void HYDROGUI_ImportImageOp::setPresentationTrsfPoints( HYDROGUI_PrsImage* thePr if ( !theIsByTwoPoints ) aPointMap[ HYDROGUI_PrsImage::PointC ].Point = theLocalPointC; + thePrs->setIsByTwoPoints( theIsByTwoPoints ); thePrs->setTransformationPointMap( aPointMap ); } } @@ -262,19 +263,29 @@ void HYDROGUI_ImportImageOp::commitOperation() HYDROGUI_InputPanel* HYDROGUI_ImportImageOp::createInputPanel() const { HYDROGUI_InputPanel* aPanel = new HYDROGUI_ImportImageDlg( module(), getName() ); - connect( aPanel, SIGNAL( createPreview( QImage ) ), - this, SLOT( onCreatePreview( QImage ) ) ); - connect( aPanel, SIGNAL( activatePointSelection( int ) ), - this, SLOT( onActivatePointSelection( int ) ) ); - connect( aPanel, SIGNAL( pointCoordChanged( bool, int, bool, int ) ), - this, SLOT( onPointCoordChanged( bool, int, bool, int ) ) ); - connect( aPanel, SIGNAL( modeActivated( int ) ), - this, SLOT( onModeActivated( int ) ) ); + connect( aPanel, SIGNAL( createPreview( QImage ) ), SLOT( onCreatePreview( QImage ) ) ); + connect( aPanel, SIGNAL( activatePointSelection( int ) ), SLOT( onActivatePointSelection( int ) ) ); + connect( aPanel, SIGNAL( pointCoordChanged( bool, int, bool, int ) ), + SLOT( onPointCoordChanged( bool, int, bool, int ) ) ); + connect( aPanel, SIGNAL( modeActivated( int ) ), SLOT( onModeActivated( int ) ) ); connect( aPanel, SIGNAL( refImageActivated( const QString& ) ), - this, SLOT( onRefImageActivated( const QString& ) ) ); + SLOT( onRefImageActivated( const QString& ) ) ); + connect( aPanel, SIGNAL( setCIsUsed( bool ) ), SLOT( onSetCIsUsed( bool ) ) ); return aPanel; } +void HYDROGUI_ImportImageOp::onSetCIsUsed( bool theCIsUsed ) +{ + if ( myPreviewPrs ) + { + myPreviewPrs->setIsByTwoPoints( !theCIsUsed ); + } + if ( myRefPreviewPrs ) + { + myRefPreviewPrs->setIsByTwoPoints( !theCIsUsed ); + } +} + bool HYDROGUI_ImportImageOp::checkPoints( const QPointF& thePointA, const QPointF& thePointB, const QPointF& thePointC, @@ -689,6 +700,7 @@ void HYDROGUI_ImportImageOp::onPointSelected( bool theIsRefImage ) const HYDROGUI_PrsImage::TransformationPointMap& aPointMap = aPrs->getTransformationPointMap(); + HYDROGUI_PrsImage::TransformationPointMapIterator anIter( aPointMap ); while( anIter.hasNext() ) {