From 61fb3768941cc37f11d168eea57e86fe68fb16a5 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 28 Sep 2006 08:18:06 +0000 Subject: [PATCH] PAL10867: noexcepthandler option in GUI not working. Disable signals catching. --- src/GEOM_I/GEOM_Gen_i.cc | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 7ddbe46c9..9e7288424 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -68,18 +68,23 @@ GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr orb, _impl = new ::GEOMImpl_Gen; - //work around PAL12004, PAL12628 - //OSD::SetSignal( true ); - bool raiseFPE; + //PAL10867: disable signals catching with "noexcepthandler" option + char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS"); + if (!envNoCatchSignals || !atoi(envNoCatchSignals)) + { + //work around PAL12004, PAL12628 + //OSD::SetSignal( true ); + bool raiseFPE; #ifdef _DEBUG_ - raiseFPE = true; - char* envDisableFPE = getenv("DISABLE_FPE"); - if (envDisableFPE && atoi(envDisableFPE)) - raiseFPE = false; + raiseFPE = true; + char* envDisableFPE = getenv("DISABLE_FPE"); + if (envDisableFPE && atoi(envDisableFPE)) + raiseFPE = false; #else - raiseFPE = false; + raiseFPE = false; #endif - OSD::SetSignal( raiseFPE ); + OSD::SetSignal( raiseFPE ); + } } //============================================================================ @@ -463,6 +468,9 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, TDF_Tool::Entry(anObj->GetEntry(), anEntry); GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString()); + //Set the study entry of the published GEOM_Object + obj->SetStudyEntry(aNewSO->GetID()); + // Add IORAttribute to the Study and set IOR of the created GEOM_Object to it SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aNewSO, "AttributeIOR"); SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); -- 2.39.2