From c8eaebcdfbf95840f1f191c2e6ef73fe377df3f3 Mon Sep 17 00:00:00 2001 From: mzn Date: Wed, 29 Jan 2014 08:36:14 +0000 Subject: [PATCH] Bug #334: Different behavior in Edit calculation case input panel. --- src/HYDROGUI/HYDROGUI_CalculationOp.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 377e821b..f6bd8449 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -797,8 +797,15 @@ void HYDROGUI_CalculationOp::setAvailableGroups() aGroupsNames.append( aGroup->GetName() ); } } - if( myEditedObject->IsMustBeUpdated() ) - myEditedObject->RemoveGeometryGroups(); + if( myEditedObject->IsMustBeUpdated() ) { + for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ ) { + Handle(HYDROData_ShapesGroup) aGeomGroup = + Handle(HYDROData_ShapesGroup)::DownCast( aSeq.Value( anIndex ) ); + if ( !aGeomGroup.IsNull() && !aGroupsNames.contains( aGeomGroup->GetName() ) ) { + myEditedObject->RemoveGeometryGroup( aGeomGroup ); + } + } + } aPanel->setAvailableGroups( aGroupsNames ); aPanel->includeGroups( aList ); -- 2.39.2