+//=================================================================================
+// function : singleSelection
+// purpose : Performs single selection. Called from SelectionIntoArgument()
+//=================================================================================
+void BooleanGUI_Dialog::singleSelection()
+{
+ myEditCurrentArgument->setText("");
+
+ GEOM::GeomObjPtr aSelectedObject = getSelected( TopAbs_SHAPE );
+ TopoDS_Shape aShape;
+ if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) {
+ 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()), Qt::UniqueConnection);
+
+ if (myEditCurrentArgument == myGroup->LineEdit1) {
+ myObject1 = aSelectedObject;
+ if (!myGroup->PushButton2->isHidden() && !myObjects.count())
+ myGroup->PushButton2->click();
+ }
+ else if (myEditCurrentArgument == myGroup->LineEdit2) {
+ myObjects.clear();
+ myObjects << aSelectedObject;
+ if (!myObject1)
+ myGroup->PushButton1->click();
+ }
+ }
+ else {
+ if (myEditCurrentArgument == myGroup->LineEdit1) myObject1.nullify();
+ else if (myEditCurrentArgument == myGroup->LineEdit2) reset();