From: eap Date: Fri, 13 Jan 2006 11:14:24 +0000 (+0000) Subject: PAL10953. protection against creating sub-mesh in an imported mesh X-Git-Tag: T_Before_Join_BR-D5-38-2003~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c35657d6fe6e299b7c531b59a101809ed11e228;p=modules%2Fsmesh.git PAL10953. protection against creating sub-mesh in an imported mesh --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 7e590a8b6..57103003d 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -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( 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; } diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index ba1f4f80a..54287cd1c 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -1,3 +1,18 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2006-01-13 13:50+0300\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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"