+ else {
+ if (myEditCurrentArgument == myGroup->LineEdit1) myObject1.nullify();
+ else if (myEditCurrentArgument == myGroup->LineEdit2) reset();
+ }
+}
+
+//=================================================================================
+// function : multipleSelection
+// purpose : Performs multiple selection. Called from SelectionIntoArgument()
+//=================================================================================
+void BooleanGUI_Dialog::multipleSelection()
+{
+ myEditCurrentArgument->setText( "" );
+ reset();
+
+ myObjects = getSelected( TopAbs_SHAPE, -1 );
+
+ int i = myObjects.count();
+ if ( i == 1 ) {
+ myEditCurrentArgument->setText( GEOMBase::GetName( myObjects.first().get() ) );
+ } else if ( i > 0 ) {
+ myEditCurrentArgument->setText( QString::number( i ) + "_" + tr( "GEOM_OBJECTS" ) );
+ }
+}
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection is changed or on dialog initialization or activation
+//=================================================================================
+void BooleanGUI_Dialog::SelectionIntoArgument()
+{
+ myEditCurrentArgument->setText("");
+ if ( myOperation == BooleanGUI::SECTION ||
+ (myOperation == BooleanGUI::CUT &&
+ myEditCurrentArgument == myGroup->LineEdit1)) {
+ singleSelection();
+ } else {
+ multipleSelection();
+ }
+
+ processPreview();