From 94566fd3fa802b70cbb5cbd31552978101606477 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 16 Dec 2016 10:32:21 +0300 Subject: [PATCH] refs #1092: patch for crash in batch mode tests --- src/HYDROData/HYDROData_CalculationCase.cxx | 6 +++--- src/HYDROData/HYDROData_GeomTool.cxx | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 8dee02d6..c224cd7d 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -752,13 +752,13 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& aResAltitude = GetAltitudeForPoint( thePoint, aZone, theMethod ); else { - DEBTRACE("GetAltitudeForPoint Region " << aRefRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString() << " ---------------------------"); + //DEBTRACE("GetAltitudeForPoint Region " << aRefRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString() << " ---------------------------"); aResAltitude = GetAltitudeForPoint( thePoint, aZone, theMethod ); } } else { - DEBTRACE(" --- GetAltitudeForPoint No Zone ---"); + //DEBTRACE(" --- GetAltitudeForPoint No Zone ---"); } return aResAltitude; @@ -785,7 +785,7 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& } else if ( aZoneMergeType == HYDROData_Zone::Merge_UNKNOWN ) { - DEBTRACE("GetAltitudeForPoint Zone " << theZone->GetName().toStdString() << " Merge_UNKNOWN"); + //DEBTRACE("GetAltitudeForPoint Zone " << theZone->GetName().toStdString() << " Merge_UNKNOWN"); return aResAltitude; } diff --git a/src/HYDROData/HYDROData_GeomTool.cxx b/src/HYDROData/HYDROData_GeomTool.cxx index 3d54e13f..a152909c 100644 --- a/src/HYDROData/HYDROData_GeomTool.cxx +++ b/src/HYDROData/HYDROData_GeomTool.cxx @@ -197,7 +197,12 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GE } for (size_t i = 0; i < aFc->length(); i++) - GEOMBase::PublishSubObject(aFc->operator[](i), Names[i]); + { + std::string name = Names[i].toStdString(); + GEOM::GEOM_Object_ptr anObj = aFc->operator[](i); + //GEOMBase::PublishSubObject( anObj, name.c_str() ); + theGeomEngine->AddInStudy( theStudy, anObj, name.c_str(), aGeomObj ); + } return aGeomObj; } -- 2.39.2