]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
patch for regression in zlayers for images
authorasl <asl@opencascade.com>
Mon, 30 Mar 2015 14:31:18 +0000 (17:31 +0300)
committerasl <asl@opencascade.com>
Mon, 30 Mar 2015 14:31:18 +0000 (17:31 +0300)
src/HYDROGUI/HYDROGUI_ImagePrs.cxx
src/HYDROGUI/HYDROGUI_Shape.cxx

index b178b6f300dadbc979396f2760c1dca2b41d34c8..ff5997c57430af002331706cc94ee456a5d3b8b5 100644 (file)
@@ -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
index 5f99a1f96f542333ab60a15c3b8307e18a3979f3..4d20f3fdee5b16ca403cd8e696885f70313527ff 100644 (file)
@@ -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 )
 {
 }