+ if(!toMerge)
+ SpinBoxTol->SetValue(1e-05);
+}
+
+//=======================================================================
+//function : onResultTypeChange
+//purpose :
+//=======================================================================
+
+void SMESHGUI_BuildCompoundDlg::onResultTypeChange( int buttonID )
+{
+ LineEditNewName ->setEnabled( buttonID == NEW_MESH_ID );
+ SelectButtonAppendTo->setEnabled( buttonID == APPEND_TO_ID );
+ LineEditAppendTo ->setEnabled( buttonID == APPEND_TO_ID );
+
+ if ( CurrentLineEdit == LineEditAppendTo && buttonID == NEW_MESH_ID )
+ onSelectionButton(); // to select into myMeshArray
+
+ if ( buttonID == NEW_MESH_ID )
+ {
+ myMeshToAppendTo = SMESH::SMESH_Mesh::_nil();
+ LineEditAppendTo->setText("");
+ }
+ else
+ {
+ // activate selection of myMeshToAppendTo
+ SelectButtonAppendTo->click();
+ LineEditAppendTo->setFocus();
+ }
+}
+
+//=======================================================================
+//function : onSelectionButton
+//purpose :
+//=======================================================================
+
+void SMESHGUI_BuildCompoundDlg::onSelectionButton()
+{
+ mySelectionMgr->clearFilters();
+ if ( sender() == SelectButtonAppendTo )
+ {
+ mySelectionMgr->installFilter( myAppendToFilter );
+ CurrentLineEdit = LineEditAppendTo;
+ }
+ else
+ {
+ mySelectionMgr->installFilter( myMeshFilter );
+ CurrentLineEdit = LineEditMeshes;
+ }
+ CurrentLineEdit->setFocus();
+
+ SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool SMESHGUI_BuildCompoundDlg::isValid()
+{
+ QString msg;
+ bool ok=true;
+ if(CheckBoxMerge->isChecked())
+ ok = SpinBoxTol->isValid( msg, true );
+
+ if( !ok ) {
+ QString str( tr( "SMESH_INCORRECT_INPUT" ) );
+ if ( !msg.isEmpty() )
+ str += "\n" + msg;
+ SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
+ return false;
+ }
+ return true;
+}
+
+//================================================================
+// function : setIsApplyAndClose
+// Purpose : Set value of the flag indicating that the dialog is
+// accepted by Apply & Close button
+//================================================================
+void SMESHGUI_BuildCompoundDlg::setIsApplyAndClose( const bool theFlag )
+{
+ myIsApplyAndClose = theFlag;
+}
+
+//================================================================
+// function : isApplyAndClose
+// Purpose : Get value of the flag indicating that the dialog is
+// accepted by Apply & Close button
+//================================================================
+bool SMESHGUI_BuildCompoundDlg::isApplyAndClose() const
+{
+ return myIsApplyAndClose;