X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Shape.cxx;h=37eaf35001c6050e1f74bab38968ac0aaa59cef9;hb=a1431f03eac1d1aed4203d0568d987c41ce939b3;hp=8ff001e2183bdd3fea701e2a4ef2ddb89eb86672;hpb=2930e23df45888720001ce2c9f25e9355c3c9b96;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index 8ff001e2..37eaf350 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -350,6 +351,28 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) setFillingColor( aFillingColor, false, false ); setBorderColor( aBorderColor, false, false ); } + else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ShapesGroup) ) ) + { + Handle(HYDROData_ShapesGroup) aShapesGroup = + Handle(HYDROData_ShapesGroup)::DownCast( myObject ); + + TopTools_SequenceOfShape aShapes; + aShapesGroup->GetShapes( aShapes ); + + BRepBuilderAPI_MakeWire aMakeWire; + + for ( int i = 1, n = aShapes.Length(); i <= n; ++i ) + { + TopoDS_Edge anEdge = TopoDS::Edge( aShapes.Value( i ) ); + aMakeWire.Add( anEdge ); + } + + aMakeWire.Build(); + TopoDS_Wire aResWire = aMakeWire.Wire(); + + setWire( aResWire, false, false ); + setBorderColor( Qt::red, false, false ); + } } if ( myShape.IsNull() || !isVisible() ) @@ -377,7 +400,7 @@ void HYDROGUI_Shape::setVisible( const bool theState, myContext->Erase( myShape, theIsUpdateViewer ); } -void HYDROGUI_Shape::highlight( bool theIsHighlight ) +void HYDROGUI_Shape::highlight( bool theIsHighlight, bool isUpdateViewer ) { if ( myIsHighlight == theIsHighlight ) return; @@ -388,7 +411,7 @@ void HYDROGUI_Shape::highlight( bool theIsHighlight ) return; colorShapeBorder( getActiveColor() ); - myContext->Display( myShape ); + myContext->Display( myShape, isUpdateViewer ); } bool HYDROGUI_Shape::isHighlighted() const @@ -671,7 +694,10 @@ void HYDROGUI_Shape::colorShapeBorder( const QColor& theColor ) Handle(Prs3d_LineAspect) aBoundaryAspect = anAttributes->FaceBoundaryAspect(); if ( !aBoundaryAspect.IsNull() ) + { aBoundaryAspect->SetColor( aBorderColor ); + anAttributes->SetFaceBoundaryAspect( aBoundaryAspect ); + } } } else if ( myDisplayMode == AIS_WireFrame )