]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Refs #320: Point C is shown in reference image, however it isn't checked Import image...
authornds <nds@opencascade.com>
Thu, 9 Jan 2014 13:13:27 +0000 (13:13 +0000)
committernds <nds@opencascade.com>
Thu, 9 Jan 2014 13:13:27 +0000 (13:13 +0000)
The second part of the bug.

src/HYDROGUI/HYDROGUI_ImportImageOp.cxx
src/HYDROGUI/HYDROGUI_PrsImage.cxx

index 625d263612f4ab2b9f8578523314c326200820c8..3533cee2c7d4f651860227a4c2b8efa7b7a30d01 100644 (file)
@@ -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 );
index fde013574161227fb50a732413aafa8f889ebd67..8b2c8a0ebcd3ec42a13d634a5f73a7ef450a84a1 100644 (file)
@@ -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 );