From 52489860fcb7ab09a794addb2f2a9eb3db2c0a24 Mon Sep 17 00:00:00 2001 From: ana Date: Wed, 7 Mar 2012 13:41:55 +0000 Subject: [PATCH] Fix for the bug IPAL22807:"TC6.4.0: input objects are not highlighted in 3D viewer" --- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 89d129e53..42718d046 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -262,22 +262,23 @@ void PrimitiveGUI_CylinderDlg::SelectionIntoArgument() QString aName = GEOMBase::GetName( aSelectedObject.get() ); myEditCurrentArgument->setText(aName); - - // clear selection - disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), - this, SLOT(SelectionIntoArgument())); if (myEditCurrentArgument == GroupPoints->LineEdit1) { myPoint = aSelectedObject; if (myPoint && !myDir) - GroupPoints->PushButton2->click(); + GroupPoints->PushButton2->click(); } else if (myEditCurrentArgument == GroupPoints->LineEdit2) { myDir = aSelectedObject; if (myDir && !myPoint) - GroupPoints->PushButton1->click(); + GroupPoints->PushButton1->click(); + } + // clear selection + if ((myDir && !myPoint) || (myPoint && !myDir)) { + disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + myGeomGUI->getApp()->selectionMgr()->clearSelected(); + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); } } -- 2.39.2