PAL10953. protection against creating sub-mesh in an imported mesh

This commit is contained in:
eap 2006-01-13 11:14:24 +00:00
parent a47909aa5e
commit 3c35657d6f
2 changed files with 33 additions and 0 deletions

View File

@ -500,6 +500,20 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
return false;
}
// Imported mesh, if create sub-mesh or edit mesh
if ( !myToCreate || ( myToCreate && !myIsMesh ))
{
QString aMeshEntry = myDlg->selectedObject
( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.latin1() )) {
SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
if ( !mesh->_is_nil() && CORBA::is_nil( mesh->GetShapeToMesh() )) {
theMess = tr( "IMPORTED_MESH" );
return false;
}
}
}
// Geom
if ( myToCreate )
{
@ -538,6 +552,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
}
}
}
return true;
}

View File

@ -1,3 +1,18 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2006-01-13 13:50+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
# This is a Qt message file in .po format. Each msgid starts with
# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
# would be translated to "Pub", not "Foo::Pub".
@ -2957,6 +2972,9 @@ msgstr "A submesh on the selected geometry already exists.\n Do you want to edit
msgid "SMESHGUI_MeshOp::MESH_IS_NULL"
msgstr "Mesh is null"
msgid "SMESHGUI_MeshOp::IMPORTED_MESH"
msgstr "Mesh is not built on geometry"
msgid "SMESHGUI_MeshOp::INVALID_SUBSHAPE"
msgstr "Geometry object is not a subshape of the shape to mesh"