PAL13330( When mesh generation does not success, trace where )

-  void ModifiedMesh (_PTR(SObject) theSObject, bool theIsRight);
+  void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNot, bool isEmptyMesh=false);
+      aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_PARTIAL");
This commit is contained in:
eap 2007-04-10 14:11:29 +00:00
parent 3f93b306d9
commit 467cba1441
2 changed files with 13 additions and 9 deletions

View File

@ -254,7 +254,7 @@ namespace SMESH{
return theSObject->GetFather(); return theSObject->GetFather();
} }
void ModifiedMesh (_PTR(SObject) theSObject, bool theIsRight) void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNotModif, bool isEmptyMesh)
{ {
_PTR(Study) aStudy = GetActiveStudyDocument(); _PTR(Study) aStudy = GetActiveStudyDocument();
if (aStudy->GetProperties()->IsLocked()) if (aStudy->GetProperties()->IsLocked())
@ -264,10 +264,12 @@ namespace SMESH{
_PTR(GenericAttribute) anAttr = _PTR(GenericAttribute) anAttr =
aBuilder->FindOrCreateAttribute(theSObject,"AttributePixMap"); aBuilder->FindOrCreateAttribute(theSObject,"AttributePixMap");
_PTR(AttributePixMap) aPixmap = anAttr; _PTR(AttributePixMap) aPixmap = anAttr;
if (theIsRight) { if (theIsNotModif) {
aPixmap->SetPixMap("ICON_SMESH_TREE_MESH"); aPixmap->SetPixMap("ICON_SMESH_TREE_MESH");
} else { } else if ( isEmptyMesh ) {
aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN"); aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN");
} else {
aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_PARTIAL");
} }
_PTR(ChildIterator) anIter = aStudy->NewChildIterator(theSObject); _PTR(ChildIterator) anIter = aStudy->NewChildIterator(theSObject);
@ -279,11 +281,13 @@ namespace SMESH{
_PTR(SObject) aSObj1 = anIter1->Value(); _PTR(SObject) aSObj1 = anIter1->Value();
anAttr = aBuilder->FindOrCreateAttribute(aSObj1, "AttributePixMap"); anAttr = aBuilder->FindOrCreateAttribute(aSObj1, "AttributePixMap");
aPixmap = anAttr; aPixmap = anAttr;
if (theIsRight) { if (theIsNotModif) {
aPixmap->SetPixMap("ICON_SMESH_TREE_MESH"); aPixmap->SetPixMap("ICON_SMESH_TREE_MESH");
} else { } else if ( isEmptyMesh ) {
aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN"); aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN");
} } else {
aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_PARTIAL");
}
} }
} }
} }

View File

@ -124,7 +124,7 @@ namespace SMESH {
_PTR(SObject) GetMeshOrSubmesh (_PTR(SObject) theSObject); _PTR(SObject) GetMeshOrSubmesh (_PTR(SObject) theSObject);
void ModifiedMesh (_PTR(SObject) theSObject, bool theIsRight); void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNot, bool isEmptyMesh=false);
void ShowHelpFile (QString theHelpFileName); void ShowHelpFile (QString theHelpFileName);
} }