]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
bos #32216 [CEA] GUI ergonomic: navigation cube. Debug navition cube selection in...
authorjfa <jfa@opencascade.com>
Wed, 14 Dec 2022 10:12:31 +0000 (13:12 +0300)
committerjfa <jfa@opencascade.com>
Wed, 14 Dec 2022 10:12:31 +0000 (13:12 +0300)
src/PartSet/PartSet_Filters.cpp

index f674cf7219d96dcd253614b339e43e3432a69610..ac23d62844480d7c863f5f48f95df7cc23972b02 100644 (file)
@@ -31,6 +31,8 @@
 
 #include <AIS_InteractiveObject.hxx>
 #include <AIS_Shape.hxx>
+#include <AIS_Trihedron.hxx>
+#include <AIS_ViewCube.hxx>
 #include <StdSelect_BRepOwner.hxx>
 
 
@@ -59,9 +61,19 @@ Standard_Boolean PartSet_GlobalFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
   ModuleBase_Operation* anOperation = myWorkshop->module()->currentOperation();
 
 #ifdef HAVE_SALOME
-  // Issue #3161: Do not use presentations for non-SHAPER objects
-  if (!anOperation && !aObj.get())
-    return false;
+  if (!aObj.get()) {
+    // Workaround to enable View Cube and Trihedron selection
+    if (!aAisObj.IsNull()) {
+      if (aAisObj->IsKind(STANDARD_TYPE(AIS_Trihedron)) ||
+          aAisObj->IsKind(STANDARD_TYPE(AIS_ViewCube))) {
+        return true;
+      }
+    }
+
+    // Issue #3161: Do not use presentations for non-SHAPER objects
+    if (!anOperation)
+      return false;
+  }
 #endif
 
   // the shapes from different documents should be provided if there is no started operation