+ if ( !mainFrame()->GroupConstructors->isEnabled() )
+ ActivateThisDialog();
+}
+
+//=================================================================================
+// function : createOperation
+// purpose :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr BuildGUI_CompoundDlg::createOperation()
+{
+ return getGeomEngine()->GetIShapesOperations( getStudyId() );
+}
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool BuildGUI_CompoundDlg::isValid( QString& )
+{
+ return !myShapes.isEmpty();
+}
+
+//=================================================================================
+// function : execute
+// purpose :
+//=================================================================================
+bool BuildGUI_CompoundDlg::execute( ObjectList& objects )
+{
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
+
+ GEOM::ListOfGO_var objlist = new GEOM::ListOfGO();
+ objlist->length( myShapes.count() );
+ for ( int i = 0; i < myShapes.count(); i++ )
+ objlist[i] = myShapes[i].copy();
+
+ GEOM::GEOM_Object_var anObj = anOper->MakeCompound( objlist );
+
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+
+ return true;
+}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject )
+{
+ if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
+ // empty list of arguments means that all arguments should be restored
+ getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
+ /*theInheritFirstArg=*/false,
+ mainFrame()->CheckBoxAddPrefix->isChecked() );
+ }