mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 01:10:35 +05:00
Fix bug SMESH5451: SMESH_mechanic script aborts.
This commit is contained in:
parent
e6982c22a6
commit
d09f539218
@ -104,6 +104,9 @@ void SMESH_Swig::Init(int studyID)
|
|||||||
myStudyBuilder->DefineComponentInstance(father, CompMesh );
|
myStudyBuilder->DefineComponentInstance(father, CompMesh );
|
||||||
if (aLocked) myStudy->GetProperties()->SetLocked(true);
|
if (aLocked) myStudy->GetProperties()->SetLocked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mySComponentMesh=father;
|
||||||
|
|
||||||
// Tags definition
|
// Tags definition
|
||||||
Tag_HypothesisRoot = 1;
|
Tag_HypothesisRoot = 1;
|
||||||
Tag_AlgorithmsRoot = 2;
|
Tag_AlgorithmsRoot = 2;
|
||||||
@ -136,6 +139,7 @@ const char* SMESH_Swig::AddNewMesh(const char* IOR)
|
|||||||
SALOMEDS::AttributePixMap_var aPixmap;
|
SALOMEDS::AttributePixMap_var aPixmap;
|
||||||
|
|
||||||
SALOMEDS::SObject_var HypothesisRoot;
|
SALOMEDS::SObject_var HypothesisRoot;
|
||||||
|
ASSERT(!mySComponentMesh->_is_nil());
|
||||||
if (!mySComponentMesh->FindSubObject (Tag_HypothesisRoot, HypothesisRoot)) {
|
if (!mySComponentMesh->FindSubObject (Tag_HypothesisRoot, HypothesisRoot)) {
|
||||||
HypothesisRoot = myStudyBuilder->NewObjectToTag (mySComponentMesh, Tag_HypothesisRoot);
|
HypothesisRoot = myStudyBuilder->NewObjectToTag (mySComponentMesh, Tag_HypothesisRoot);
|
||||||
anAttr = myStudyBuilder->FindOrCreateAttribute(HypothesisRoot, "AttributeName");
|
anAttr = myStudyBuilder->FindOrCreateAttribute(HypothesisRoot, "AttributeName");
|
||||||
|
Loading…
Reference in New Issue
Block a user