0020978: EDF 1475 SMESH: Convert linear to quadratic on a submesh

fix a bug found by Renaud (note 0010641)
This commit is contained in:
eap 2011-03-28 12:22:53 +00:00
parent c09e9f7015
commit 9e3ba593d5

View File

@ -234,20 +234,21 @@ bool SMESHGUI_ConvToQuadOp::onApply()
{ {
SMESH::SMESH_MeshEditor_var aEditor = mesh->GetMeshEditor(); SMESH::SMESH_MeshEditor_var aEditor = mesh->GetMeshEditor();
aResult = true; aResult = true;
SMESH::SMESH_Mesh_var sourceMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pObj );
if( !myDlg->CurrentRB() ) if( !myDlg->CurrentRB() )
{ {
bool aParam = true; bool aParam = true;
if( myDlg->IsEnabledCheck() ) if( myDlg->IsEnabledCheck() )
aParam = myDlg->IsMediumNdsOnGeom(); aParam = myDlg->IsMediumNdsOnGeom();
if ( myDlg->isWarningShown() ) if ( sourceMesh->_is_nil() )
aEditor->ConvertToQuadraticObject( aParam, idSource ); aEditor->ConvertToQuadraticObject( aParam, idSource );
else else
aEditor->ConvertToQuadratic( aParam ); aEditor->ConvertToQuadratic( aParam );
} }
else else
{ {
if ( myDlg->isWarningShown() ) if ( sourceMesh->_is_nil() )
aEditor->ConvertFromQuadraticObject( idSource ); aEditor->ConvertFromQuadraticObject( idSource );
else else
aEditor->ConvertFromQuadratic(); aEditor->ConvertFromQuadratic();