X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_CalculationOp.cxx;h=134c3bd0b2996beb4d13914db545b34c115e382b;hb=58bb6b7459bebeeb089c9ed486c4683a8bae7288;hp=734964c9fa2199390477d3713b69ac47ae955ea6;hpb=376a63867e44b8d03f678b74d37385bae5b18bb6;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 734964c9..134c3bd0 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -1238,7 +1238,8 @@ void HYDROGUI_CalculationOp::createPreview( const bool theLandCoverMap ) } // Get a boundary polyline if any - aSeq.Append( myEditedObject->GetBoundaryPolyline() ); + if (Handle(HYDROData_PolylineXY) aBPoly = myEditedObject->GetBoundaryPolyline()) + aSeq.Append( aBPoly ); module()->removeViewShapes( HYDROGUI_Module::VMR_PreviewCaseZones ); @@ -1275,16 +1276,19 @@ void HYDROGUI_CalculationOp::createPreview( const bool theLandCoverMap ) HYDROData_SequenceOfObjects::Iterator anIter( aSeq ); for ( ; anIter.More(); anIter.Next() ) { - setObjectVisibility( anIter.Value(), true ); + const Handle(HYDROData_Entity)& ent = anIter.Value(); + if (!ent.IsNull()) + setObjectVisibility( ent, true ); } //Process the draw events for viewer QApplication::processEvents( QEventLoop::ExcludeUserInputEvents ); - if ( OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView() ) - vw->onTopView(); } module()->update( UF_OCCViewer | UF_FitAll ); + + if ( OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView() ) + vw->onTopView(); } } @@ -1367,11 +1371,11 @@ void HYDROGUI_CalculationOp::setAvailableGroups() HYDROData_SequenceOfObjects anObjs = myEditedObject->GetGeometryObjects(); for( int anIndex = 1, aLength = anObjs.Length(); anIndex <= aLength; anIndex++ ) { - Handle_HYDROData_Object anObj = Handle_HYDROData_Object::DownCast( anObjs.Value( anIndex ) ); + Handle(HYDROData_Object) anObj = Handle(HYDROData_Object)::DownCast( anObjs.Value( anIndex ) ); HYDROData_SequenceOfObjects aGroups = anObj->GetGroups(); for( int aGIndex = 1, aGLength = aGroups.Length(); aGIndex <= aGLength; aGIndex++ ) { - Handle_HYDROData_ShapesGroup aGroup = Handle_HYDROData_ShapesGroup::DownCast( aGroups.Value( aGIndex ) ); + Handle(HYDROData_ShapesGroup) aGroup = Handle(HYDROData_ShapesGroup)::DownCast( aGroups.Value( aGIndex ) ); aGroupsNames.append( aGroup->GetName() ); } }