From: nds Date: Thu, 9 Jan 2014 13:13:27 +0000 (+0000) Subject: Refs #320: Point C is shown in reference image, however it isn't checked Import image... X-Git-Tag: BR_hydro_v_0_8~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66d416b1aa5a5d48fc64b5080eb9280fb58573ba;p=modules%2Fhydro.git Refs #320: Point C is shown in reference image, however it isn't checked Import image dockable panel The second part of the bug. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index 625d2636..3533cee2 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -731,6 +731,7 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName ) QImage anImage; Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast( HYDROGUI_Tool::FindObjectByName( module(), theName, KIND_IMAGE ) ); + HYDROGUI_ImportImageDlg* aPanel = (HYDROGUI_ImportImageDlg*)inputPanel(); if( !anImageObj.IsNull() ) { anImage = anImageObj->Image(); @@ -742,6 +743,8 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName ) myRefPreviewPrs->setIsTransformationPointPreview( true ); myRefPreviewPrs->setTransformationPointType( myPointType ); + myRefPreviewPrs->setIsByTwoPoints( aPanel->isByTwoPoints() ); + // Add the new reference image presentation to the appropriate view aViewPort->addItem( myRefPreviewPrs ); } @@ -760,7 +763,6 @@ void HYDROGUI_ImportImageOp::onRefImageActivated( const QString& theName ) } // Initialize the dialog - HYDROGUI_ImportImageDlg* aPanel = (HYDROGUI_ImportImageDlg*)inputPanel(); aPanel->setImageSize( anImage.size(), true ); aPanel->initializePointSelection(); onPointSelected( true ); diff --git a/src/HYDROGUI/HYDROGUI_PrsImage.cxx b/src/HYDROGUI/HYDROGUI_PrsImage.cxx index fde01357..8b2c8a0e 100644 --- a/src/HYDROGUI/HYDROGUI_PrsImage.cxx +++ b/src/HYDROGUI/HYDROGUI_PrsImage.cxx @@ -39,6 +39,7 @@ HYDROGUI_PrsImage::HYDROGUI_PrsImage( const Handle(HYDROData_Entity)& theObject myCaptionItem( 0 ), myPrsImageFrame( 0 ), myIsTransformationPointPreview( false ), + myIsByTwoPoints( true ), myTransformationPointType( None ) { myTransformationPointCursor = new QCursor( Qt::CrossCursor );