Merge from BR_WIN_INDUS_514 04/10/2010

This commit is contained in:
vsr 2010-10-04 14:16:14 +00:00
parent 324f7b8ed8
commit 396a60d4bb
3 changed files with 12 additions and 5 deletions

View File

@ -141,7 +141,9 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg(SMESHGUI* theModule):
// buttons --> OK and Help buttons // buttons --> OK and Help buttons
myOkBtn = new QPushButton(tr("SMESH_BUT_OK" ), myButtonsGroup); myOkBtn = new QPushButton(tr("SMESH_BUT_OK" ), myButtonsGroup);
myOkBtn->setAutoDefault(true); myOkBtn->setDefault(true); myOkBtn->setAutoDefault(true);
myOkBtn->setDefault(true);
myOkBtn->setFocus();
myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP" ), myButtonsGroup); myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP" ), myButtonsGroup);
myHelpBtn->setAutoDefault(true); myHelpBtn->setAutoDefault(true);

View File

@ -98,7 +98,7 @@ private:
int myLocalID; int myLocalID;
void changeLocalId(int localId) { myLocalID = localId; } void changeLocalId(int localId) { myLocalID = localId; }
friend void SMESH_Mesh_i::CheckGeomGroupModif(); friend class SMESH_Mesh_i;
}; };
// ====== // ======

View File

@ -121,24 +121,27 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
{ {
INFOS("~SMESH_Mesh_i"); INFOS("~SMESH_Mesh_i");
#ifdef WITHGENERICOBJ
// destroy groups // destroy groups
map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr; map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr;
for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++) { for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++) {
if ( CORBA::is_nil( itGr->second ))
continue;
SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>(SMESH_Gen_i::GetServant(itGr->second).in()); SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>(SMESH_Gen_i::GetServant(itGr->second).in());
if (aGroup) { if (aGroup) {
// this method is called from destructor of group (PAL6331) // this method is called from destructor of group (PAL6331)
//_impl->RemoveGroup( aGroup->GetLocalID() ); //_impl->RemoveGroup( aGroup->GetLocalID() );
#ifdef WITHGENERICOBJ aGroup->myMeshServant = 0;
aGroup->Destroy(); aGroup->Destroy();
#endif
} }
} }
_mapGroups.clear(); _mapGroups.clear();
#ifdef WITHGENERICOBJ
// destroy submeshes // destroy submeshes
map<int, SMESH::SMESH_subMesh_ptr>::iterator itSM; map<int, SMESH::SMESH_subMesh_ptr>::iterator itSM;
for ( itSM = _mapSubMeshIor.begin(); itSM != _mapSubMeshIor.end(); itSM++ ) { for ( itSM = _mapSubMeshIor.begin(); itSM != _mapSubMeshIor.end(); itSM++ ) {
if ( CORBA::is_nil( itSM->second ))
continue;
SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in()); SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in());
if (aSubMesh) { if (aSubMesh) {
aSubMesh->Destroy(); aSubMesh->Destroy();
@ -149,6 +152,8 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
// destroy hypotheses // destroy hypotheses
map<int, SMESH::SMESH_Hypothesis_ptr>::iterator itH; map<int, SMESH::SMESH_Hypothesis_ptr>::iterator itH;
for ( itH = _mapHypo.begin(); itH != _mapHypo.end(); itH++ ) { for ( itH = _mapHypo.begin(); itH != _mapHypo.end(); itH++ ) {
if ( CORBA::is_nil( itH->second ))
continue;
SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in()); SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in());
if (aHypo) { if (aHypo) {
aHypo->Destroy(); aHypo->Destroy();