Salome HOME
Issue #2521: Use Salome module icon
[modules/shaper.git] / src / XGUI / XGUI_SelectionActivate.cpp
index f8a1aaa886926bfa3c60f26475e4899bd70a9653..3c6fc2f7191ea1a578c8113b588cb4374cbb7ec1 100644 (file)
 //#define DEBUG_ACTIVATE_AIS
 //#define DEBUG_DEACTIVATE_AIS
 
+#ifdef TINSPECTOR
+#include <inspector/VInspectorAPI_CallBack.hxx>
+#endif
+
 #define CLEAR_OUTDATED_SELECTION_BEFORE_REDISPLAY
 
 //**************************************************************
@@ -333,11 +337,19 @@ void XGUI_SelectionActivate::activateAIS(const Handle(AIS_InteractiveObject)& th
   }
   if (!aContext.IsNull()) {
     if (myWorkshop->module()) {
-      int aMode = (theMode > 8)? theMode : AIS_Shape::SelectionType(theMode);
+      // the code is obsolete, used in additional check before activate, it was removed
+      //int aMode = (theMode > 8)? theMode : AIS_Shape::SelectionType(theMode);
       aContext->Activate(theIO, theMode, false);
-    } else
+#ifdef TINSPECTOR
+      if (getDisplayer()->getCallBack()) getDisplayer()->getCallBack()->Activate(theIO, theMode);
+#endif
+    }
+    else {
       aContext->Activate(theIO, theMode, false);
-
+#ifdef TINSPECTOR
+      if (getDisplayer()->getCallBack()) getDisplayer()->getCallBack()->Activate(theIO, theMode);
+#endif
+    }
     // the fix from VPA for more suitable selection of sketcher lines
     if (theIO->Width() > 1) {
       double aPrecision = theIO->Width() + 2;