Salome HOME
Fix for the bug #42: point C is not activated, but point C is shown in preview in...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportImageDlg.cxx
index 1d9510f41e2eec70e2ff8826f9e2817c4378e569..74fcfc1cf8f3de45f09bad785c77cb45f24b1197 100644 (file)
@@ -288,7 +288,7 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myRefPointXMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) );
   connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myRefPointYMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) );
 
-  connect( myPointCEnabler, SIGNAL( toggled( bool ) ), SIGNAL( setIsByTwoPoints( bool ) ) );
+  connect( myPointCEnabler, SIGNAL( toggled( bool ) ), SLOT( onSetCIsUsed( bool ) ) );
 
   aTransformLayout->setColumnStretch( 1, 1 ); // double
   aTransformLayout->setColumnStretch( 3, 1 ); // degrees
@@ -318,6 +318,16 @@ HYDROGUI_ImportImageDlg::~HYDROGUI_ImportImageDlg()
 {
 }
 
+void HYDROGUI_ImportImageDlg::onSetCIsUsed( bool theCIsUsed )
+{
+  if ( !theCIsUsed  && myPointBtnMap[ HYDROGUI_PrsImage::PointC ]->isChecked() )
+  {
+    // Turn on point A selection if point C selection has been activated and we disable point C.
+    myPointBtnMap[ HYDROGUI_PrsImage::PointA ]->toggle();
+  }
+  emit setCIsUsed( theCIsUsed );
+}
+
 void HYDROGUI_ImportImageDlg::setIsEdit( const bool theIsEdit )
 {
   myFileNameGroup->setVisible( !theIsEdit );