Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / ModuleBase / ModuleBase_ViewerFilters.cpp
index a7e2cd3f7b383a80988a86f2f1d8ab396fb37274..1e56112a7ebf23a03a1c47737af88e9a23831ca2 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        ModuleBase_ViewerFilters.cpp
 // Created:     07 Okt 2014
 // Author:      Vitaly SMETANNIKOV
@@ -37,7 +39,11 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(const Handle(SelectMgr_Ent
       if (aObj) {
         DocumentPtr aDoc = aObj->document();
         SessionPtr aMgr = ModelAPI_Session::get();
-        return (aDoc == aMgr->activeDocument() /* MPV: for the current moment selection in other document is not possible || (aDoc == aMgr->moduleDocument()*/);
+        return (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
+      }
+      else {
+        // This is not object controlled by the filter
+        return Standard_True;
       }
     }
   }
@@ -74,6 +80,10 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk(const Handle(SelectMgr_Enti
           bool aD3 = myPlane.Distance(aLastPnt) < Precision::Confusion();
           return aD1 && aD2 && aD3;
         }
+      default:
+        // This is not object controlled by the filter
+        return Standard_True;
+      break;
       }
     } else {
       // This is not object controlled by the filter