mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-28 01:50:34 +05:00
IPAL 22430: TC6.3.0: impossible to change color for group of vertices
This commit is contained in:
parent
ac23e51c26
commit
52744dc183
@ -139,7 +139,7 @@ static inline int getTopAbsMode( const int implType )
|
||||
}
|
||||
}
|
||||
|
||||
static int getMinMaxShapeType( const TopoDS_Shape& shape, bool ismin )
|
||||
int GEOM_Displayer::getMinMaxShapeType( const TopoDS_Shape& shape, bool ismin )
|
||||
{
|
||||
if ( shape.IsNull() )
|
||||
return TopAbs_SHAPE;
|
||||
@ -163,7 +163,7 @@ static int getMinMaxShapeType( const TopoDS_Shape& shape, bool ismin )
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool isCompoundOfVertices( const TopoDS_Shape& theShape )
|
||||
bool GEOM_Displayer::isCompoundOfVertices( const TopoDS_Shape& theShape )
|
||||
{
|
||||
return theShape.ShapeType() == TopAbs_COMPOUND && getMinMaxShapeType( theShape, false ) == TopAbs_VERTEX;
|
||||
}
|
||||
|
@ -167,6 +167,13 @@ public:
|
||||
/*Get color of the geom object*/
|
||||
static SALOMEDS::Color getColor(GEOM::GEOM_Object_var aGeomObject, bool& hasColor);
|
||||
|
||||
/* Get minimum or maximum enclosed shape type */
|
||||
static int getMinMaxShapeType( const TopoDS_Shape& shape, bool ismin );
|
||||
|
||||
/* Check if the object is a vertex or a compound of vertices */
|
||||
static bool isCompoundOfVertices( const TopoDS_Shape& theShape );
|
||||
|
||||
|
||||
/* Builds presentation of not published object */
|
||||
virtual SALOME_Prs* buildSubshapePresentation(const TopoDS_Shape& aShape,
|
||||
const QString&,
|
||||
|
@ -292,7 +292,8 @@ void GEOMToolsGUI::OnColor()
|
||||
|
||||
if ( io->IsKind( STANDARD_TYPE(AIS_Shape) ) ) {
|
||||
TopoDS_Shape theShape = Handle(AIS_Shape)::DownCast( io )->Shape();
|
||||
if (theShape.ShapeType() == TopAbs_VERTEX) {
|
||||
bool onlyVertex = (theShape.ShapeType() == TopAbs_VERTEX || GEOM_Displayer::isCompoundOfVertices( theShape ));
|
||||
if (onlyVertex) {
|
||||
// Set color for a point
|
||||
|
||||
Handle(AIS_Drawer) aCurDrawer = io->Attributes();
|
||||
|
Loading…
Reference in New Issue
Block a user