]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
INT PAL 0052630: Bring to front behavior is not correct
authormpa <mpa@opencascade.com>
Tue, 24 Mar 2015 09:39:17 +0000 (12:39 +0300)
committermpa <mpa@opencascade.com>
Tue, 24 Mar 2015 09:39:17 +0000 (12:39 +0300)
src/GEOMGUI/GEOM_Displayer.cxx
src/OBJECT/GEOM_AISShape.cxx

index f2dd8bdb07e62099a4d64b38b4a0cf30a1eac571..3d17ca13edf0224d81d4bb5c7d99a6354d199b21 100644 (file)
@@ -843,8 +843,6 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
                             propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() );
 
   // - face boundaries color and line width
-  if( AISShape->DisplayMode() == GEOM_AISShape::ShadingWithEdges )
-    AISShape->Attributes()->SetFaceBoundaryDraw( Standard_True );
   anAspect = AISShape->Attributes()->FaceBoundaryAspect();
   anAspect->SetColor( SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::OutlineColor ) ).value<QColor>() ) );
   anAspect->SetWidth( propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
index b1f7ade349d6fa61e13871b6d6a5bc46318dbfa2..52285710dc2cb11bcc365dc4f63df27be9c77505 100644 (file)
@@ -254,24 +254,21 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
     }
     case ShadingWithEdges:
     {
+      myDrawer->SetFaceBoundaryDraw( Standard_True );
       shadingMode(aPresentationManager, aPrs, Shading);
-      if( anIsColorField && myFieldDimension == 1 )
+      if( anIsColorField && myFieldDimension == 1 ) {
+        myDrawer->SetFaceBoundaryDraw( Standard_False );
         drawField( aPrs );
-      else
-        myDrawer->SetFaceBoundaryDraw( Standard_True );
+      }
       break;
     }
     case TexturedShape:
     {
-      if(!isTopLev)
 #ifdef USE_TEXTURED_SHAPE
        AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
 #else
        AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
 #endif
-      else 
-       shadingMode(aPresentationManager, aPrs, Shading);
-      break;
     }
   }
   if (isShowVectors())
@@ -443,10 +440,10 @@ void GEOM_AISShape::setTopLevel(Standard_Boolean f) {
       myPrevDisplayMode = DisplayMode();
     Standard_Integer dm;
     switch(topLevelDisplayMode()) {
-      case TopKeepCurrent :      dm = myPrevDisplayMode; break;
-      case TopWireFrame :        dm = Wireframe;         break;     
+      case TopWireFrame :        dm = Wireframe;         break;
+      case TopShading :          dm = Shading;           break;
       case TopShadingWithEdges : dm = ShadingWithEdges;  break;
-      default :                  dm = Shading;           break;
+      default :                  dm = myPrevDisplayMode; break;
     }
     SetDisplayMode(dm);
   } else {