diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index 8986cdee7..eca862007 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -30,6 +30,8 @@ #include #include +#include "LightApp_DataOwner.h" + #include #include #include @@ -99,6 +101,13 @@ QVariant GEOMGUI_Selection::parameter( const int ind, const QString& p ) const return LightApp_Selection::parameter( ind, p ); } +// the method to skip temporary objects from selection (called from LightApp) + +bool GEOMGUI_Selection::processOwner( const LightApp_DataOwner* theOwner) +{ + return !theOwner->entry().contains("_"); +} + QString GEOMGUI_Selection::typeName( const int index ) const { if ( isComponent( index ) ) diff --git a/src/GEOMGUI/GEOMGUI_Selection.h b/src/GEOMGUI/GEOMGUI_Selection.h index bb8d0aaab..ee195625b 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.h +++ b/src/GEOMGUI/GEOMGUI_Selection.h @@ -34,6 +34,7 @@ #include CORBA_SERVER_HEADER(GEOM_Gen) class LightApp_SelectionMgr; +class LightApp_DataOwner; class GEOMGUI_EXPORT GEOMGUI_Selection : public LightApp_Selection { @@ -43,6 +44,8 @@ public: virtual QVariant parameter( const int, const QString& ) const; virtual QVariant parameter( const QString& ) const; + + virtual bool processOwner( const LightApp_DataOwner* ); private: bool isVisible( const int ) const; diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index aa628f194..d5df83adb 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -1530,6 +1530,8 @@ void GeometryGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(anObj); if (CORBA::is_nil(aGeomObj) || aGeomObj->GetType() != GEOM_IMPORT) isImported = false; + } else { + isImported = false; } }