Patch for bug IPAL9210(3.0.0 "GEOM_usinggeom.py" script execution failed.).

This commit is contained in:
mzn 2005-06-17 12:22:39 +00:00
parent 8383118883
commit 35c0ccc268

View File

@ -182,19 +182,30 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theS
//Set a not done flag //Set a not done flag
GetOperations()->SetNotDone(); GetOperations()->SetNotDone();
if (theShape == NULL) return 0; if (theShape == NULL)
{
theDescription = CORBA::string_dup("null");
return 0;
}
//Get the reference shape //Get the reference shape
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
(theShape->GetStudyID(), theShape->GetEntry()); (theShape->GetStudyID(), theShape->GetEntry());
if (aShape.IsNull()) return 0; if (aShape.IsNull())
{
theDescription = CORBA::string_dup("null2");
return 0;
}
// Get shape parameters // Get shape parameters
TCollection_AsciiString aDump; TCollection_AsciiString aDump;
if (GetOperations()->CheckShape(aShape, aDump)) return 1; if (GetOperations()->CheckShape(aShape, aDump))
{
theDescription = CORBA::string_dup(aDump.ToCString()); theDescription = CORBA::string_dup(aDump.ToCString());
return 1;
}
theDescription = CORBA::string_dup("checkShape 0");
return 0; return 0;
} }