-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "XGUI_SelectionActivate.h"
//#define DEBUG_ACTIVATE_AIS
//#define DEBUG_DEACTIVATE_AIS
+#ifdef TINSPECTOR
+#include <inspector/VInspectorAPI_CallBack.hxx>
+#endif
+
#define CLEAR_OUTDATED_SELECTION_BEFORE_REDISPLAY
//**************************************************************
}
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;
void XGUI_SelectionActivate::deactivateTrihedronInSelectionModes()
{
Handle(AIS_InteractiveContext) aContext = AISContext();
- Handle(AIS_Trihedron) aTrihedron = Handle(AIS_Trihedron)::DownCast(getTrihedron());
- /// deactivate trihedron in selection modes
- TColStd_ListOfInteger aTColModes;
- aContext->ActivatedModes(aTrihedron, aTColModes);
- TColStd_ListIteratorOfListOfInteger itr( aTColModes );
- for (; itr.More(); itr.Next() ) {
- Standard_Integer aMode = itr.Value();
- aContext->Deactivate(aTrihedron, aMode);
+ if (!aContext.IsNull()) {
+ Handle(AIS_Trihedron) aTrihedron = Handle(AIS_Trihedron)::DownCast(getTrihedron());
+ /// deactivate trihedron in selection modes
+ TColStd_ListOfInteger aTColModes;
+ aContext->ActivatedModes(aTrihedron, aTColModes);
+ TColStd_ListIteratorOfListOfInteger itr(aTColModes);
+ for (; itr.More(); itr.Next()) {
+ Standard_Integer aMode = itr.Value();
+ aContext->Deactivate(aTrihedron, aMode);
+ }
}
}