Fix for Bug IPAL9161(3.0.0 (09 June): It is impossible to perform Fillet and Chamfer operations).

This commit is contained in:
mzn 2005-06-15 06:17:13 +00:00
parent 8c31a421f1
commit b8a1ff1356
3 changed files with 12 additions and 6 deletions

View File

@ -4,9 +4,10 @@
// function : GEOM_TypeFilter // function : GEOM_TypeFilter
// purpose : // 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 ), :GEOM_SelectionFilter( study ),
myType( type ) myType( type ),
myIsShapeType(isShapeType)
{ {
} }
@ -26,7 +27,12 @@ bool GEOM_TypeFilter::isOk( const SUIT_DataOwner* sOwner ) const
{ {
GEOM::GEOM_Object_var obj = getObject( sOwner ); GEOM::GEOM_Object_var obj = getObject( sOwner );
if ( !CORBA::is_nil( obj ) ) if ( !CORBA::is_nil( obj ) )
return obj->GetType() == type(); {
if (!myIsShapeType)
return obj->GetType() == type();
else
return obj->GetShapeType() == type();
}
return false; return false;
} }

View File

@ -10,7 +10,7 @@
class GEOM_TypeFilter : public GEOM_SelectionFilter class GEOM_TypeFilter : public GEOM_SelectionFilter
{ {
public: public:
GEOM_TypeFilter(SalomeApp_Study* study, const int type ); GEOM_TypeFilter(SalomeApp_Study* study, const int type, const bool isShapeType = false );
~GEOM_TypeFilter(); ~GEOM_TypeFilter();
virtual bool isOk( const SUIT_DataOwner* ) const; virtual bool isOk( const SUIT_DataOwner* ) const;
@ -19,7 +19,7 @@ public:
private: private:
int myType; int myType;
bool myIsShapeType;
}; };
#endif #endif

View File

@ -132,7 +132,7 @@ SUIT_SelectionFilter* GEOM_Displayer::getFilter( const int theMode )
int aTopAbsMode = getTopAbsMode( theMode ); int aTopAbsMode = getTopAbsMode( theMode );
if ( aTopAbsMode != -1 ) 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 else
switch ( theMode ) switch ( theMode )
{ {