-}
-
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- disconnect(mySelectionMgr, 0, this, 0);
- mySelectionMgr->clearFilters();
- //mySelectionMgr->clearSelected();
- if (SMESH::GetCurrentVtkView()) {
- SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
- SMESH::SetPointRepresentation(false);
- }
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
- mySMESHGUI->ResetState();
-}
-
-//=======================================================================
-//function : onSelectMesh
-//purpose :
-//=======================================================================
-void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
-{
- if (toSelectMesh) {
- myIDs = LineEditElements->text();
- TextLabelElements->setText(tr("SMESH_NAME"));
- }
- else
- TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
- myFilterBtn->setEnabled(!toSelectMesh);
-
- if (myEditCurrentArgument != LineEditElements) {
- LineEditElements->clear();
- mySimulation->SetVisibility(false);
- return;
- }
-
- mySelectionMgr->clearFilters();
- SMESH::SetPointRepresentation(false);
-
- if (toSelectMesh) {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
- LineEditElements->setReadOnly(true);
- LineEditElements->setValidator(0);
- } else {
- int aConstructorId = GetConstructorId();
- if (aConstructorId == 0)
- {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(EdgeSelection);
- }
- else if (aConstructorId == 1)
- {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(FaceSelection);
- }
-
- LineEditElements->setReadOnly(false);
- LineEditElements->setValidator(myIdValidator);
- onTextChange(LineEditElements->text());
- mySimulation->SetVisibility(false);