From: asl Date: Mon, 30 Mar 2015 14:31:18 +0000 (+0300) Subject: patch for regression in zlayers for images X-Git-Tag: BR_hydro_v_1_0_5~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=31b482e05a42dd73ce5004e897e59ad2c353fc78;p=modules%2Fhydro.git patch for regression in zlayers for images --- diff --git a/src/HYDROGUI/HYDROGUI_ImagePrs.cxx b/src/HYDROGUI/HYDROGUI_ImagePrs.cxx index b178b6f3..ff5997c5 100644 --- a/src/HYDROGUI/HYDROGUI_ImagePrs.cxx +++ b/src/HYDROGUI/HYDROGUI_ImagePrs.cxx @@ -69,19 +69,24 @@ void HYDROGUI_ImagePrs::ComputeSelection( const Handle(SelectMgr_Selection)&, co } void HYDROGUI_ImagePrs::Compute( const Handle(PrsMgr_PresentationManager3d)&, - const Handle(Prs3d_Presentation)& aPrs, const Standard_Integer ) + const Handle(Prs3d_Presentation)& aPrs, + const Standard_Integer theMode ) { - aPrs->Clear(); + if ( aPrs.IsNull() || myImage.IsNull() ) + return; - if ( aPrs.IsNull() || myImage.IsNull() ) - return; - - Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs ); + aPrs->Clear(); + Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs ); + if( theMode==0 ) + { + } + else + { Graphic3d_MaterialAspect aMat( Graphic3d_NOM_PLASTIC ); aMat.SetTransparency( 0.5 ); Handle(Graphic3d_AspectFillArea3d) aFillAspect = - new Graphic3d_AspectFillArea3d( Aspect_IS_SOLID, Quantity_NOC_WHITE, Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0, aMat, aMat ); + new Graphic3d_AspectFillArea3d( Aspect_IS_SOLID, Quantity_NOC_WHITE, Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0, aMat, aMat ); Handle(Graphic3d_TextureMap) aTex = new Graphic3d_Texture2Dmanual( myImage ); aFillAspect->SetTextureMapOn(); @@ -99,6 +104,7 @@ void HYDROGUI_ImagePrs::Compute( const Handle(PrsMgr_PresentationManager3d)&, aGroup->SetGroupPrimitivesAspect( aFillAspect ); aGroup->AddPrimitiveArray( aTriangles ); + } } gp_Pnt HYDROGUI_ImagePrs::convert( const QPointF& thePoint ) const diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index 5f99a1f9..4d20f3fd 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -57,7 +57,7 @@ HYDROGUI_Shape::HYDROGUI_Shape( const Handle(AIS_InteractiveContext)& theContext myHighlightColor( Qt::white ), myIsToUpdate( false ), myIsVisible( true ), - myDisplayMode( AIS_WireFrame ) + myDisplayMode( AIS_Shaded ) { }