From 442d38a4173d351c853d1b135deab283284d4eeb Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 14 Dec 2022 13:12:31 +0300 Subject: [PATCH] bos #32216 [CEA] GUI ergonomic: navigation cube. Debug navition cube selection in Shaper. --- src/PartSet/PartSet_Filters.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/PartSet/PartSet_Filters.cpp b/src/PartSet/PartSet_Filters.cpp index f674cf721..ac23d6284 100644 --- a/src/PartSet/PartSet_Filters.cpp +++ b/src/PartSet/PartSet_Filters.cpp @@ -31,6 +31,8 @@ #include #include +#include +#include #include @@ -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 -- 2.39.2