From b8a1ff1356782792675417967adeb0643fd40887 Mon Sep 17 00:00:00 2001 From: mzn Date: Wed, 15 Jun 2005 06:17:13 +0000 Subject: [PATCH] Fix for Bug IPAL9161(3.0.0 (09 June): It is impossible to perform Fillet and Chamfer operations). --- src/GEOMFiltersSelection/GEOM_TypeFilter.cxx | 12 +++++++++--- src/GEOMFiltersSelection/GEOM_TypeFilter.h | 4 ++-- src/GEOMGUI/GEOM_Displayer.cxx | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx b/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx index d5785f513..645806c72 100644 --- a/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx @@ -4,9 +4,10 @@ // 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) { } @@ -26,7 +27,12 @@ bool GEOM_TypeFilter::isOk( const SUIT_DataOwner* sOwner ) const { 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; } diff --git a/src/GEOMFiltersSelection/GEOM_TypeFilter.h b/src/GEOMFiltersSelection/GEOM_TypeFilter.h index 393b16a9a..1f077a2c6 100644 --- a/src/GEOMFiltersSelection/GEOM_TypeFilter.h +++ b/src/GEOMFiltersSelection/GEOM_TypeFilter.h @@ -10,7 +10,7 @@ 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; @@ -19,7 +19,7 @@ public: private: int myType; - + bool myIsShapeType; }; #endif diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index a8a839790..dbc26153b 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -132,7 +132,7 @@ SUIT_SelectionFilter* GEOM_Displayer::getFilter( const int theMode ) 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 ) { -- 2.39.2