mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
mySelector(SMESH::GetViewWindow( theModule )->GetSelector()),
myIsBusy( false ),
- myActor( 0 )
+ myActor( 0 ),
+ myOldActorMode( -1 )
{
if (!name) setName("SMESHGUI_GroupDlg");
initDialog(true);
myActor = SMESH::FindActorByObject(myMesh);
SMESH::SetPickable(myActor);
+ storeMode();
SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList );
if ( !myActor )
myActor = SMESH::FindActorByObject(myGroup);
SMESH::SetPickable(myActor);
-
+ storeMode();
+
myGrpTypeGroup->setButton(0);
onGrpTypeChanged(0);
if ( !myActor )
myActor = SMESH::FindActorByObject(myGroup);
SMESH::SetPickable(myActor);
+ storeMode();
myGrpTypeGroup->setButton(1);
onGrpTypeChanged(1);
//=================================================================================
void SMESHGUI_GroupDlg::onTypeChanged (int id)
{
- if (myTypeId != id) {
+ if (myTypeId != id)
+ {
myElements->clear();
+ unsigned int aMode = -1;
+ switch( id )
+ {
+ case 0://node
+ aMode = SMESH_Actor::eAllEntity;
+ break;
+ case 1://edge
+ aMode = SMESH_Actor::eEdges;
+ break;
+ case 2://face
+ aMode = SMESH_Actor::eFaces;
+ break;
+ case 3://volume
+ aMode = SMESH_Actor::eVolumes;
+ break;
+ }
+ if( myActor && aMode>=0 )
+ myActor->SetEntityMode( aMode );
if (myCurrentLineEdit == 0)
setSelectionMode(id);
}
myActor = SMESH::FindActorByObject(myMesh);
SMESH::SetPickable(myActor);
+ storeMode();
aString = aList.First()->getName();
myMeshGroupLine->setText(aString) ;
myActor = SMESH::FindActorByObject(myGroupOnGeom);
else
myActor = SMESH::FindActorByObject(myMesh);
+ storeMode();
}
myIsBusy = false;
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
-
+ if( myActor && myOldActorMode>=0 )
+ myActor->SetEntityMode( myOldActorMode );
reject();
}
setSelectionMode(7);
}
}
+
+void SMESHGUI_GroupDlg::storeMode()
+{
+ if( myActor )
+ myOldActorMode = myActor->GetEntityMode();
+}