- } else {
- if (theMode == 4)
- mySelectionMgr->installFilter(mySubMeshFilter);
- else if (theMode == 5)
- mySelectionMgr->installFilter(myGroupFilter);
- else if (theMode == 6)
- mySelectionMgr->installFilter(myMeshFilter);
- else if (theMode == 7)
- mySelectionMgr->installFilter(myGeomFilter);
-
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
+ 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);
+ }
+ QList<SUIT_SelectionFilter*> filtList;
+ filtList.append( f );
+ myGroupFilter->setFilters( filtList );
+
+ mySelectionMgr->installFilter(myGroupFilter);
+ if ( aViewWindow ) aViewWindow->SetSelectionMode(ActorSelection);
+ break;