From 8357ffed812b951029fd33939362fac0e8127391 Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 14 Dec 2012 13:19:42 +0000 Subject: [PATCH] Mantis issue 0021865: Adding tangency in Spline creation --- src/BasicGUI/BasicGUI_CurveDlg.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index ffb3f7ebf..14b23a858 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -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(); } //================================================================================= -- 2.39.2