- if (theMode < 4) {
- switch (theMode) {
- case 0:
- if (myActor)
- myActor->SetPointRepresentation(true);
- else
- SMESH::SetPointRepresentation(true);
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(NodeSelection);
- break;
- case 1:
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(EdgeSelection);
- break;
- case 2:
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(FaceSelection);
- break;
- default:
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(VolumeSelection);
+
+ switch (theMode) {
+ case grpNodeSelection:
+ if ( myGrpTypeId == 0 ) // standalone
+ {
+ if (myActorsList.count() > 0)
+ for (QListIterator<SMESH_Actor*> it( myActorsList ); it.hasNext(); )
+ it.next()->SetPointRepresentation(true);
+ else
+ SMESH::SetPointRepresentation(true);
+ }
+ if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
+ break;
+ case grpEdgeSelection:
+ if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : EdgeSelection);
+ break;
+ case grpBallSelection:
+ //if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : BallSelection);
+ break;
+ case grpFaceSelection:
+ if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : FaceSelection);
+ break;
+ case grpVolumeSelection:
+ if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : VolumeSelection);
+ break;
+ case grpSubMeshSelection: {
+
+ SMESH_TypeFilter* f = 0;
+ switch (myTypeId) {
+ case grpNodeSelection: f = new SMESH_TypeFilter(SUBMESH); break;
+ case grpEdgeSelection: f = new SMESH_TypeFilter(SUBMESH_EDGE); break;
+ case grpFaceSelection: f = new SMESH_TypeFilter(SUBMESH_FACE); break;
+ case grpVolumeSelection: f = new SMESH_TypeFilter(SUBMESH_SOLID); break;
+ default: f = new SMESH_TypeFilter(SUBMESH);
+ }
+ QList<SUIT_SelectionFilter*> filtList;
+ filtList.append( f );
+ filtList.append( new SMESH_TypeFilter(SUBMESH_COMPOUND));
+ mySubMeshFilter->setFilters( filtList );
+
+ mySelectionMgr->installFilter( mySubMeshFilter );
+
+ if ( aViewWindow ) aViewWindow->SetSelectionMode(ActorSelection);
+ break;
+ }
+ case grpGroupSelection: {
+
+ SMESH_TypeFilter* f = 0;
+ switch (myTypeId) {
+ case grpNodeSelection: f = new SMESH_TypeFilter(GROUP_NODE); break;
+ case grpBallSelection: f = new SMESH_TypeFilter(GROUP_BALL); break;
+ case grpEdgeSelection: f = new SMESH_TypeFilter(GROUP_EDGE); break;
+ case grpFaceSelection: f = new SMESH_TypeFilter(GROUP_FACE); break;
+ case grpVolumeSelection: f = new SMESH_TypeFilter(GROUP_VOLUME); break;
+ default: f = new SMESH_TypeFilter(GROUP);