]> OCCT Git - occt.git/commitdiff
Visualization, Selection - allow HandleMouseClick for schemes, allowing to select...
authorsshutina <svetlana.shutina@opencascade.com>
Fri, 7 Mar 2025 19:05:37 +0000 (19:05 +0000)
committerGitHub <noreply@github.com>
Fri, 7 Mar 2025 19:05:37 +0000 (19:05 +0000)
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext.hxx
src/SelectMgr/SelectMgr_EntityOwner.hxx

index fad207adeca6396e862f3ae01dc538e3d6e379fa..cb2e52e3524e49673508738d9cd44e77715d7416 100644 (file)
@@ -2742,7 +2742,10 @@ AIS_StatusOfPick AIS_InteractiveContext::SelectPoint(const Graphic3d_Vec2i&    t
 
 AIS_StatusOfPick AIS_InteractiveContext::SelectDetected(const AIS_SelectionScheme theSelScheme)
 {
-  if (theSelScheme == AIS_SelectionScheme_Replace && !myLastPicked.IsNull())
+  // For all selection schemes, allowing to select an object,
+  // HandleMouseClick is available
+  if (theSelScheme != AIS_SelectionScheme_Remove && theSelScheme != AIS_SelectionScheme_Clear
+      && !myLastPicked.IsNull())
   {
     Graphic3d_Vec2i aMousePos(-1, -1);
     gp_Pnt2d        aMouseRealPos = MainSelector()->GetManager().GetMousePosition();
index 63410dbbd8c44e8c1ce2e2c1e1354ac18c005a3e..ee4e231af5b44d21988574a02bdd8be2d435b13d 100644 (file)
@@ -565,6 +565,8 @@ public: //! @name Selection management
   //! (Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected)
   //! @sa PrsMgr_PresentableObject::HilightAttributes() defining per-object highlight style of
   //! selected owners (overrides defaults)
+  //! For all selection schemes, allowing to select an object,
+  //! HandleMouseClick is available
   Standard_EXPORT AIS_StatusOfPick
     SelectDetected(const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace);
 
index a18174472c111ed462cdce0cc9fb8dcd9e7d4b73..dfd94e757ed2a5845c568ef22c127f8a9c5650e7 100644 (file)
@@ -75,6 +75,8 @@ public:
   //! @param theModifiers  key modifiers
   //! @param theIsDoubleClick flag indicating double mouse click
   //! @return TRUE if object handled click
+  //! For all selection schemes, allowing to select an object,
+  //! it's available
   virtual Standard_Boolean HandleMouseClick(const Graphic3d_Vec2i& thePoint,
                                             Aspect_VKeyMouse       theButton,
                                             Aspect_VKeyFlags       theModifiers,