// function : GEOM_TypeFilter
// purpose :
//=======================================================================
-GEOM_TypeFilter::GEOM_TypeFilter( SalomeApp_Study* study, const int type )
+GEOM_TypeFilter::GEOM_TypeFilter( SalomeApp_Study* study, const int type, const bool isShapeType )
:GEOM_SelectionFilter( study ),
-myType( type )
+ myType( type ),
+ myIsShapeType(isShapeType)
{
}
{
GEOM::GEOM_Object_var obj = getObject( sOwner );
if ( !CORBA::is_nil( obj ) )
- return obj->GetType() == type();
+ {
+ if (!myIsShapeType)
+ return obj->GetType() == type();
+ else
+ return obj->GetShapeType() == type();
+ }
return false;
}
class GEOM_TypeFilter : public GEOM_SelectionFilter
{
public:
- GEOM_TypeFilter(SalomeApp_Study* study, const int type );
+ GEOM_TypeFilter(SalomeApp_Study* study, const int type, const bool isShapeType = false );
~GEOM_TypeFilter();
virtual bool isOk( const SUIT_DataOwner* ) const;
private:
int myType;
-
+ bool myIsShapeType;
};
#endif
int aTopAbsMode = getTopAbsMode( theMode );
if ( aTopAbsMode != -1 )
- aFilter = new GEOM_TypeFilter( getStudy(), theMode ); //@ aFilter = new GEOM_TypeFilter( ( TopAbs_ShapeEnum )aTopAbsMode );
+ aFilter = new GEOM_TypeFilter( getStudy(), aTopAbsMode, true ); //@ aFilter = new GEOM_TypeFilter( ( TopAbs_ShapeEnum )aTopAbsMode );
else
switch ( theMode )
{