Salome HOME
IPAL21558 In Group creation dialog, selection of sub-shapes in OB, viewer and dialog...
authordmv <dmv@opencascade.com>
Fri, 5 Feb 2010 09:29:39 +0000 (09:29 +0000)
committerdmv <dmv@opencascade.com>
Fri, 5 Feb 2010 09:29:39 +0000 (09:29 +0000)
src/GEOMGUI/GEOMGUI_Selection.cxx
src/GEOMGUI/GEOMGUI_Selection.h
src/GEOMGUI/GeometryGUI.cxx

index 8986cdee70c7c7645885d9bdb3d0a727fc983cf8..eca862007d40b4ef859311063489c30394214dc1 100644 (file)
@@ -30,6 +30,8 @@
 #include <SalomeApp_Application.h>
 #include <SalomeApp_Study.h>
 
+#include "LightApp_DataOwner.h"
+
 #include <SUIT_Desktop.h>
 #include <SUIT_Session.h>
 #include <SUIT_ViewWindow.h>
@@ -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 ) )
index bb8d0aaab7fef938d2fb16fe8e78c38fd6ae7267..ee195625bb4e2b9fcbe74bcc855cc5af45af2b05 100644 (file)
@@ -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;
index aa628f194b49574739db33794319458c989359ab..d5df83adb96272710844ed8eb0bbb62a7189fea0 100644 (file)
@@ -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;
     }
   }