]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Mantis issue 0021865: Adding tangency in Spline creation
authorjfa <jfa@opencascade.com>
Fri, 14 Dec 2012 13:19:42 +0000 (13:19 +0000)
committerjfa <jfa@opencascade.com>
Fri, 14 Dec 2012 13:19:42 +0000 (13:19 +0000)
src/BasicGUI/BasicGUI_CurveDlg.cxx

index ffb3f7ebf86f02beca4e07126702d11fd73fe01b..14b23a8584d92002f1379e6d3cef1b3b765a3dbe 100644 (file)
@@ -207,6 +207,7 @@ void BasicGUI_CurveDlg::Init()
 
   connect(myGroupPoints->CheckButton1, SIGNAL(toggled(bool)),    this, SLOT(CheckButtonToggled()));
   connect(myGroupPoints->CheckButton2, SIGNAL(toggled(bool)),    this, SLOT(CheckButtonToggled()));
+  connect(myGroupTangents,             SIGNAL(toggled(bool)),    this, SLOT(CheckButtonToggled()));
 
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
@@ -304,12 +305,20 @@ void BasicGUI_CurveDlg::SetEditCurrentArgument()
 //=================================================================================
 void BasicGUI_CurveDlg::CheckButtonToggled()
 {
-  if (getConstructorId() == 2) { // Interpolation
-    bool disableTangents = (myGroupPoints->CheckButton1->isChecked() ||
-                            myGroupPoints->CheckButton2->isChecked());
-    myGroupTangents->setEnabled(!disableTangents);
+  if (sender() == myGroupTangents) {
+    if (myGroupTangents->isChecked())
+      myPushBtnV1->click();
+    else
+      myGroupPoints->PushButton1->click();
+  }
+  else {
+    if (getConstructorId() == 2) { // Interpolation
+      bool disableTangents = (myGroupPoints->CheckButton1->isChecked() ||
+                              myGroupPoints->CheckButton2->isChecked());
+      myGroupTangents->setEnabled(!disableTangents);
+    }
+    processPreview();
   }
-  processPreview();
 }
 
 //=================================================================================